From 411fd01a20572b3e17df6dbbfcf3a290c6f96858 Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Wed, 23 Mar 2022 18:55:11 -0400 Subject: [PATCH] chore(striker-ui-api): enable clean on rebuild in webpack --- striker-ui-api/package.json | 4 +--- striker-ui-api/webpack.config.js | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/striker-ui-api/package.json b/striker-ui-api/package.json index 889c7202..59fddab8 100644 --- a/striker-ui-api/package.json +++ b/striker-ui-api/package.json @@ -4,13 +4,11 @@ "description": "API for striker-ui", "scripts": { "build": "webpack", - "build:clean": "rm -rf out", "eslint:base": "eslint --ext js,ts --max-warnings=0", "lint": "npm run eslint:base -- . && npm run prettier:base -- --check", "lint:fix": "npm run eslint:base -- --fix . && npm run prettier:base -- --write", "prettier:base": "prettier '**/*.{js,json,md,ts}'", - "rebuild": "npm run build:clean && npm run build", - "start": "npm run rebuild && node out/index.js" + "start": "npm run build && node out/index.js" }, "dependencies": { "cors": "^2.8.5", diff --git a/striker-ui-api/webpack.config.js b/striker-ui-api/webpack.config.js index 184ac703..8f5261ab 100644 --- a/striker-ui-api/webpack.config.js +++ b/striker-ui-api/webpack.config.js @@ -21,8 +21,9 @@ module.exports = { minimize: true, }, output: { - path: path.resolve(__dirname, 'out'), + clean: true, filename: 'index.js', + path: path.resolve(__dirname, 'out'), }, resolve: { extensions: ['.js', '.ts'],