webpack: add dev server
This commit is contained in:
parent
cff32999ba
commit
c8b11c8efb
3522
package-lock.json
generated
3522
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,8 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "webpack",
|
||||
"lint": "eslint --ext .js,.jsx src"
|
||||
"lint": "eslint --ext .js,.jsx src",
|
||||
"start": "webpack serve --open"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -37,6 +38,7 @@
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"style-loader": "^3.3.1",
|
||||
"webpack": "^5.75.0",
|
||||
"webpack-cli": "^5.0.1"
|
||||
"webpack-cli": "^5.0.1",
|
||||
"webpack-dev-server": "^4.11.1"
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,10 @@ module.exports = {
|
||||
config[page] = `./src/${page}.js`;
|
||||
return config;
|
||||
}, {}),
|
||||
devtool: 'inline-source-map',
|
||||
devServer: {
|
||||
static: './dist',
|
||||
},
|
||||
output: {
|
||||
filename: "[name].js",
|
||||
path: path.resolve(__dirname, "dist"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user