File tree Expand file tree Collapse file tree 3 files changed +371
-665
lines changed
Expand file tree Collapse file tree 3 files changed +371
-665
lines changed Original file line number Diff line number Diff line change 3838 "babel-loader" : " 8.1.0" ,
3939 "browser-sync" : " 2.26.13" ,
4040 "browser-sync-webpack-plugin" : " 2.2.2" ,
41- "clean-webpack-plugin" : " 3 .0.0 " ,
41+ "clean-webpack-plugin" : " 1 .0.1 " ,
4242 "create-pwa" : " 2.3.0" ,
4343 "critical" : " 2.0.6" ,
4444 "css-loader" : " 5.0.0" ,
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ const { ProvidePlugin } = require('webpack');
1010const SpritesmithPlugin = require ( 'webpack-spritesmith' ) ;
1111const BrowserSyncPlugin = require ( 'browser-sync-webpack-plugin' ) ;
1212const WebpackShellPlugin = require ( 'webpack-shell-plugin' ) ;
13+ const CleanWebpackPlugin = require ( 'clean-webpack-plugin' ) ;
1314const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' ) ;
14- const { CleanWebpackPlugin } = require ( 'clean-webpack-plugin' ) ;
1515
1616const { url, server, NODE_ENV } = argv ;
1717const sourceMap = {
@@ -131,7 +131,9 @@ const spritesmithConfig = {
131131} ;
132132
133133const cleanConfig = {
134- cleanOnceBeforeBuildPatterns : [ 'dist/*' , '!dist/sprite.svg' ]
134+ verbose : false ,
135+ exclude : [ 'sprite.svg' ] ,
136+ allowExternal : true
135137} ;
136138
137139const shellScripts = [ ] ;
@@ -219,7 +221,7 @@ module.exports = () => {
219221 } ) ,
220222 new MiniCssExtractPlugin ( extractTextConfig ) ,
221223 new SpritesmithPlugin ( spritesmithConfig ) ,
222- new CleanWebpackPlugin ( cleanConfig ) ,
224+ new CleanWebpackPlugin ( [ '../assets/dist/' ] , cleanConfig ) ,
223225 new WebpackShellPlugin ( {
224226 onBuildStart : shellScripts
225227 } )
You can’t perform that action at this time.
0 commit comments