File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1421,11 +1421,11 @@ class Encore {
1421
1421
* // common values: asset, asset/resource, asset/inline
1422
1422
* // Using "asset" will allow smaller images to be "inlined"
1423
1423
* // instead of copied.
1424
- * // javascript/auto caan be used to disable asset images (see next example)
1424
+ * // javascript/auto can be used to disable asset images (see next example)
1425
1425
* type: 'asset/resource',
1426
1426
*
1427
1427
* // applicable when for "type: asset": files smaller than this
1428
- * // size will be "inlined" into CSS, larer files will be extracted
1428
+ * // size will be "inlined" into CSS, larger files will be extracted
1429
1429
* // into independent files
1430
1430
* maxSize: 4 * 1024, // 4 kb
1431
1431
*
Original file line number Diff line number Diff line change @@ -27,6 +27,11 @@ module.exports = function(plugins, webpackConfig) {
27
27
return ;
28
28
}
29
29
30
+ const cleanOnceBeforeBuildPatterns = webpackConfig . cleanWebpackPluginPaths ;
31
+ // works around a bug where manifest.json is emitted when
32
+ // using dev-server... but then CleanWebpackPlugin deletes it
33
+ cleanOnceBeforeBuildPatterns . push ( '!manifest.json' ) ;
34
+
30
35
const cleanWebpackPluginOptions = {
31
36
verbose : false ,
32
37
cleanOnceBeforeBuildPatterns : webpackConfig . cleanWebpackPluginPaths ,
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ describe('plugins/clean', () => {
41
41
cleanPluginUtil ( plugins , config ) ;
42
42
expect ( plugins . length ) . to . equal ( 1 ) ;
43
43
expect ( plugins [ 0 ] . plugin ) . to . be . instanceof ( CleanWebpackPlugin ) ;
44
- expect ( plugins [ 0 ] . plugin . cleanOnceBeforeBuildPatterns ) . to . deep . equal ( [ '**/*' ] ) ;
44
+ expect ( plugins [ 0 ] . plugin . cleanOnceBeforeBuildPatterns ) . to . deep . equal ( [ '**/*' , '!manifest.json' ] ) ;
45
45
expect ( plugins [ 0 ] . plugin . dry ) . to . equal ( false ) ;
46
46
} ) ;
47
47
@@ -56,7 +56,7 @@ describe('plugins/clean', () => {
56
56
cleanPluginUtil ( plugins , config ) ;
57
57
expect ( plugins . length ) . to . equal ( 1 ) ;
58
58
expect ( plugins [ 0 ] . plugin ) . to . be . instanceof ( CleanWebpackPlugin ) ;
59
- expect ( plugins [ 0 ] . plugin . cleanOnceBeforeBuildPatterns ) . to . deep . equal ( [ '**/*.js' , '**/*.css' ] ) ;
59
+ expect ( plugins [ 0 ] . plugin . cleanOnceBeforeBuildPatterns ) . to . deep . equal ( [ '**/*.js' , '**/*.css' , '!manifest.json' ] ) ;
60
60
expect ( plugins [ 0 ] . plugin . dry ) . to . equal ( true ) ;
61
61
} ) ;
62
62
You can’t perform that action at this time.
0 commit comments