From 52f0bcf6fe08cf0c805cd670dc2843aae97e7027 Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Fri, 15 Nov 2024 13:48:33 -0500 Subject: [PATCH] chore: configure webpack to clean up dist/ my dist folder was bloating gradually because of webpack dev server, this should fix that issue. --- package.json | 4 ++-- webpack.config.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 22def57c..88e92fc6 100755 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "main": "index.js", "scripts": { "build": "npx webpack --mode=production", - "build-dev": "rm -rf dist/* && npx webpack --mode=development", - "watch": "rm -rf dist/* && npx webpack --mode=development --watch", + "build-dev": "npx webpack --mode=development", + "watch": "npx webpack --mode=development --watch", "start": "webpack serve --mode development --no-web-socket-server", "lint": "npx eslint src/js", "lint-fix": "npx eslint --fix src/js", diff --git a/webpack.config.js b/webpack.config.js index 3f45cbe0..269c9ed0 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -16,6 +16,7 @@ const config = { publicPath: '/', // filename: "js/bundle.js", filename: 'js/[name][chunkhash].js', + clean: true, }, module: { rules: [