Exclude single file from webpack build
-
Hi,
i have a single config file where i put in my api urls and so on. I tried to exclude this file from the webpack build and made a seperate entry point for this file which basically works. Now i have an extra config.js file in my dist folder but in the app.js the config file is also included as an module. how can i remove it complete from the bundle and work only as a single file.
Many thanks in advance,
-
This works for me:
webpack.base.conf.js: (new entry point)
entry: {
app: ‘./src/main.js’,
config: ‘./src/config/myconfig.properties’
},webpack.prod.conf.js:
new webpack.optimize.CommonsChunkPlugin({
name: ‘config’
}),