Commit f0d040d4 authored by Zac Wood's avatar Zac Wood

Better hot-reloading

parent 645223d7
......@@ -5,7 +5,7 @@
"scripts": {
"test": "echo \"Error: no tests specified\" && exit 1",
"build": "webpack",
"start": "webpack-dev-server --hot"
"start": "webpack-dev-server"
},
"license": "Apache",
"private": true,
......
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: './src/index.tsx',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/dist/',
},
devtool: 'source-map',
......@@ -25,6 +25,14 @@ module.exports = {
],
},
plugins: [new webpack.HotModuleReplacementPlugin()],
devServer: {
compress: true,
hot: true,
publicPath: '/dist/',
},
externals: {
react: 'React',
'react-dom': 'ReactDOM',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment