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
I'm trying to figure out how to build a "full" and "lite" version from the same codebase with one webpack config file.
If #define was supported, I could have two entry files, app.js and app-lite.js, with the latter starting #define LITE 1. This would then be used with #if etc. to slim down the build.
The text was updated successfully, but these errors were encountered:
webpack loaders process each file separately and isolatedly, so they can't have knowledge of a #define declared in another file. The only information shared globally is the option object passed to the loader.
Best workaround is to have a single webpack config file that changes according to some command line parameter, but you still have to run it twice.
I'm trying to figure out how to build a "full" and "lite" version from the same codebase with one webpack config file.
If
#define
was supported, I could have two entry files,app.js
andapp-lite.js
, with the latter starting#define LITE 1
. This would then be used with#if
etc. to slim down the build.The text was updated successfully, but these errors were encountered: