You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now there's a preloader env-replace that goes through all files and replaces @@PROPERTY with the values in environments.json.
Then this file is imported and set as a constant on the app module.
That's ok, but Webpack already has a solution for that exact scenario:
// Define global variables that will be available in any chunknewwebpack.DefinePlugin({ENV: process.env.NODE_ENV,API_URL: appConfig.API_URL})
This adds variables that are available in all imported modules (not on window just the global Webpack module).
I used it as is, but it could be used as a constant as well (similar to how it is now in Kick):
if(ENV==='production'){// Enable for performance boost on production$compileProvider.debugInfoEnabled(false);// Disable console.log outputs for production$logProvider.debugEnabled(false);}
The main benefit is that we'd be using something that Webpack already provides and familiar to others.
1 less package to download.
No weird characters.
The text was updated successfully, but these errors were encountered:
* master:
use DefinePlugin to handle replacements for environments (closes#40)
add missing utils module to fs-utils
update angularsj version
move fs-utils to separate module
inherit webpack output to see errors in console
# Conflicts:
# lib/utils.js
Right now there's a preloader
env-replace
that goes through all files and replaces@@PROPERTY
with the values inenvironments.json
.Then this file is imported and set as a constant on the app module.
That's ok, but Webpack already has a solution for that exact scenario:
This adds variables that are available in all imported modules (not on
window
just the global Webpack module).I used it as is, but it could be used as a constant as well (similar to how it is now in Kick):
The main benefit is that we'd be using something that Webpack already provides and familiar to others.
1 less package to download.
No weird characters.
The text was updated successfully, but these errors were encountered: