Created
October 29, 2018 17:56
-
-
Save Ranguro/1e2fed220208078b38799bab3c8189f1 to your computer and use it in GitHub Desktop.
Webpack Config
This file contains 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
const webpack = require('webpack'); | |
const merge = require('webpack-merge'); | |
const common = require('./webpack.config.common.js'); | |
const environment = 'development'; | |
const envParams = require('./webpack.params').getEnv(environment); | |
module.exports = merge(common, { | |
devtool: 'source-map', | |
devServer: { | |
inline: true | |
}, | |
entry: [ | |
// 'eventsource-polyfill', // necessary for hot reloading with IE | |
'webpack-hot-middleware/client?reload=true', // note that it reloads the page if hot module reloading fails. | |
'./client/js/index' | |
], | |
output: { | |
filename: 'index.js' | |
}, | |
watchOptions: { | |
aggregateTimeout: 10000, | |
poll: 5000 | |
}, | |
plugins: [ | |
new webpack.HotModuleReplacementPlugin(), | |
// new webpack.NoErrorsPlugin(), | |
new webpack.DefinePlugin(envParams) | |
] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment