Create hello world React app with hot module replacement

This commit is contained in:
2017-06-19 19:20:38 +00:00
parent 5f57586a7f
commit 888eff91d8
8 changed files with 105 additions and 3 deletions
+28
View File
@@ -0,0 +1,28 @@
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: './src/index.js',
plugins: [
new webpack.HotModuleReplacementPlugin(),
],
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/'
},
module: {
rules: [
{ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" }
]
},
stats: "normal",
devServer: {
contentBase: path.join(__dirname, "dist"),
publicPath: '/',
//inline: true,
hot: true,
host: '0.0.0.0',
disableHostCheck: true
},
};