Commit 645223d7 authored by Zac Wood's avatar Zac Wood

Added hot-reloading via webpack-dev-server

parent 87e6eeef
......@@ -5,7 +5,7 @@
"scripts": {
"test": "echo \"Error: no tests specified\" && exit 1",
"build": "webpack",
"start": "yarn build && open index.html"
"start": "webpack-dev-server --hot"
},
"license": "Apache",
"private": true,
......@@ -15,7 +15,8 @@
"source-map-loader": "^0.2.3",
"typescript": "^2.8.3",
"webpack": "^4.6.0",
"webpack-cli": "^2.0.15"
"webpack-cli": "^2.0.15",
"webpack-dev-server": "^3.1.3"
},
"dependencies": {
"@types/react": "^16.3.12",
......
......@@ -5,6 +5,7 @@ module.exports = {
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
publicPath: '/dist/',
},
devtool: 'source-map',
......@@ -15,7 +16,11 @@ module.exports = {
module: {
rules: [
{ test: /\.tsx?$/, loader: 'awesome-typescript-loader' },
{
test: /\.tsx?$/,
loader: 'awesome-typescript-loader',
exclude: /node_modules/,
},
{ enforce: 'pre', test: /\.js$/, loader: 'source-map-loader' },
],
},
......
This diff is collapsed.
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