Skip to content

Commit 7323780

Browse files
committed
Fix webpack devserver
1 parent 14c3cfa commit 7323780

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@
3434
},
3535
"scripts": {
3636
"build": "cross-env NODE_ENV=production webpack",
37-
"dev": "webpack serve --content-base public"
37+
"dev": "webpack serve"
3838
}
3939
}

packages/demo/webpack.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ module.exports = {
7878
],
7979
devtool: prod ? false : 'source-map',
8080
devServer: {
81-
hot: true
81+
hot: true,
82+
static: {
83+
directory: path.join(__dirname, 'public')
84+
}
8285
}
8386
}

0 commit comments

Comments
 (0)