preboot / angular-webpack

A complete, yet simple, starter for Angular v2+ using webpack
MIT License
1.29k stars 556 forks source link

Exclude file for Prod environment #312

Closed AttitudeL closed 7 years ago

AttitudeL commented 7 years ago

I have tried to exclude the a config file if the env variable isProd is true in webpack.config.js so that after "npm run build", the "dist" directory will not contain that config file. However I haven't made any progress so far.

Any help would be appreciated.

AttitudeL commented 7 years ago

I eventually solved this issue. Just need to add "ignore" in CopyWebpackPlugin for the files you want to exclude for prod.