Skip to content

Commit 6ed2047

Browse files
committed
Working around missing manifest.json bug
1 parent d549499 commit 6ed2047

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,11 +1421,11 @@ class Encore {
14211421
* // common values: asset, asset/resource, asset/inline
14221422
* // Using "asset" will allow smaller images to be "inlined"
14231423
* // 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)
14251425
* type: 'asset/resource',
14261426
*
14271427
* // 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
14291429
* // into independent files
14301430
* maxSize: 4 * 1024, // 4 kb
14311431
*

lib/plugins/clean.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ module.exports = function(plugins, webpackConfig) {
2727
return;
2828
}
2929

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+
3035
const cleanWebpackPluginOptions = {
3136
verbose: false,
3237
cleanOnceBeforeBuildPatterns: webpackConfig.cleanWebpackPluginPaths,

0 commit comments

Comments
 (0)