diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 7e092b0..bdc8ed7 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -15,6 +15,20 @@ "group": "none", "problemMatcher": [] }, + { + "label": "watch", + "command": "npm", + "type": "shell", + "args": [ + "run", + "watch" + ], + "presentation": { + "reveal": "always" + }, + "group": "none", + "problemMatcher": [] + }, { "label": "Build prod", "command": "npm", diff --git a/package.json b/package.json index c4068d0..bfece4c 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "scripts": { "devServer": "webpack-dev-server --mode development --open", "build": "webpack --mode development", - "buildProd": "webpack --mode production" + "buildProd": "webpack --mode production", + "watch":"webpack --watch --mode production" }, "author": "", "license": "ISC", diff --git a/webpack.config.js b/webpack.config.js index d217f9b..06d2da4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -27,6 +27,9 @@ module.exports = { liveReload: true, watchContentBase: true }, + watchOptions: { + ignored: ['dist/**', 'node_modules/**'] + }, module: { rules: [ {