added webpack watch

This commit is contained in:
Niklas 2020-04-24 00:00:45 +02:00
parent ae289bf75b
commit a5d72902e1
3 changed files with 19 additions and 1 deletions

14
.vscode/tasks.json vendored
View File

@ -15,6 +15,20 @@
"group": "none", "group": "none",
"problemMatcher": [] "problemMatcher": []
}, },
{
"label": "watch",
"command": "npm",
"type": "shell",
"args": [
"run",
"watch"
],
"presentation": {
"reveal": "always"
},
"group": "none",
"problemMatcher": []
},
{ {
"label": "Build prod", "label": "Build prod",
"command": "npm", "command": "npm",

View File

@ -6,7 +6,8 @@
"scripts": { "scripts": {
"devServer": "webpack-dev-server --mode development --open", "devServer": "webpack-dev-server --mode development --open",
"build": "webpack --mode development", "build": "webpack --mode development",
"buildProd": "webpack --mode production" "buildProd": "webpack --mode production",
"watch":"webpack --watch --mode production"
}, },
"author": "", "author": "",
"license": "ISC", "license": "ISC",

View File

@ -27,6 +27,9 @@ module.exports = {
liveReload: true, liveReload: true,
watchContentBase: true watchContentBase: true
}, },
watchOptions: {
ignored: ['dist/**', 'node_modules/**']
},
module: { module: {
rules: [ rules: [
{ {