Browse Source

Добавлена чистка output перед сборкой

Book Pauk 2 years ago
parent
commit
0a53648279
3 changed files with 5 additions and 2 deletions
  1. 1 0
      build/webpack.base.config.js
  2. 2 1
      build/webpack.dev.config.js
  3. 2 1
      build/webpack.prod.config.js

+ 1 - 0
build/webpack.base.config.js

@@ -13,6 +13,7 @@ module.exports = {
     entry: [`${clientDir}/main.js`],
     entry: [`${clientDir}/main.js`],
     output: {
     output: {
         publicPath: '/app/',
         publicPath: '/app/',
+        clean: true
     },
     },
 
 
     module: {
     module: {

+ 2 - 1
build/webpack.dev.config.js

@@ -17,7 +17,8 @@ module.exports = merge(baseWpConfig, {
     devtool: 'inline-source-map',
     devtool: 'inline-source-map',
     output: {
     output: {
         path: `${publicDir}/app`,
         path: `${publicDir}/app`,
-        filename: 'bundle.js'
+        filename: 'bundle.js',
+        clean: true
     },
     },
 
 
     module: {
     module: {

+ 2 - 1
build/webpack.prod.config.js

@@ -16,7 +16,8 @@ module.exports = merge(baseWpConfig, {
     mode: 'production',
     mode: 'production',
     output: {
     output: {
         path: `${publicDir}/app_new`,
         path: `${publicDir}/app_new`,
-        filename: 'bundle.[contenthash].js'
+        filename: 'bundle.[contenthash].js',
+        clean: true
     },
     },
     module: {
     module: {
         rules: [
         rules: [