webpack: add dev server

This commit is contained in:
dogeystamp 2023-01-30 21:08:22 -05:00
parent cff32999ba
commit c8b11c8efb
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
3 changed files with 3529 additions and 3 deletions

3522
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -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"
}
}

View File

@ -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"),