Skip to content

Commit

Permalink
Use webpack-dev-server
Browse files Browse the repository at this point in the history
  • Loading branch information
ihahoo committed Nov 15, 2017
1 parent 8294b5a commit 43794dd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 35 deletions.
22 changes: 20 additions & 2 deletions webpack/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ const webpackConfig = {
entry: {
main: [
'babel-polyfill',
'webpack-hot-middleware/client?path=' + host + '__webpack_hmr',
'react-hot-loader/patch',
'webpack-dev-server/client?' + host,
'webpack/hot/only-dev-server',
'font-awesome-loader!./src/assets/fontawesome/font-awesome.config.js',
'bootstrap-loader',
srcPath + 'index'
Expand Down Expand Up @@ -196,13 +197,30 @@ const webpackConfig = {
filename: distPath + 'index.html'
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('development')
NODE_ENV: JSON.stringify('development')
}
}),
webpackIsomorphicToolsPlugin.development()
],
devServer: {
host: hostname,
port,
historyApiFallback: true,
hot: true,
compress: true,
contentBase: distPath,
headers: { 'Access-Control-Allow-Origin': '*' },
publicPath: host,
quiet: false,
noInfo: false,
stats: { colors: true },
index: 'index.html',

},
resolve: {
extensions: ['.js', '.jsx'],
}
Expand Down
33 changes: 0 additions & 33 deletions webpack/webpack.devServer.js

This file was deleted.

0 comments on commit 43794dd

Please sign in to comment.