This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since @ngtools/webpack doesn't support preprocess chain loader, see (here)[https://github.com/nippur72/ifdef-loader/issues/4]. | |
We use process.env to pass the ifdef loader options and patch the compiler (webpack) to read the env and parse the files. | |
We use a prefix 'IFDEF_' to filter the environment variables. | |
This is more a fix than anything else for now. A better fix would have been a PR to enable webpack to use any preprocessor | |
but I don't have the time right now. | |
diff --git a/node_modules/@ngtools/webpack/src/compiler_host.js b/node_modules/@ngtools/webpack/src/compiler_host.js | |
index 58d942c..a7db0be 100644 | |
--- a/node_modules/@ngtools/webpack/src/compiler_host.js |