Webpack 5.1.3 chunk.files.delete
See original GitHub issueI’m getting this error when running production build with with FixStyleOnlyEntriesPlugin. Should I provide some more info?
HookWebpackError: chunk.files.delete is not a function
at makeWebpackError (/home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/HookWebpackError.js:49:9)
at /home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/Compilation.js:1995:11
at eval (eval at create (/home/vagrant/code/perkam/perkamkopa/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:17:1)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
-- inner error --
TypeError: chunk.files.delete is not a function
at Compilation.renameAsset (/home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/Compilation.js:2957:23)
at /home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/optimize/RealContentHashPlugin.js:284:21
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async Promise.all (index 2)
at async /home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/optimize/RealContentHashPlugin.js:256:6
caused by plugins in Compilation.hooks.processAssets
TypeError: chunk.files.delete is not a function
at Compilation.renameAsset (/home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/Compilation.js:2957:23)
at /home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/optimize/RealContentHashPlugin.js:284:21
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async Promise.all (index 2)
at async /home/vagrant/code/perkam/perkamkopa/node_modules/webpack/lib/optimize/RealContentHashPlugin.js:256:6
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
assets:clean deletes lazy-loaded chunks · Issue #2913
After some investigation, we believe what's going on is during deployment, assets:clean is incorrectly deleting the chunk files for some of the ...
Read more >Delete unused webpack chunked files
It searches for all updated chunks and deletes obsolete files after ... You can solve the problem № 1 by using remove-files-webpack-plugin.
Read more >SplitChunksPlugin
Webpack will automatically split chunks based on these conditions: New chunk can be shared OR modules are from the node_modules folder; New chunk...
Read more >How to Bundle a Simple Static Site Using Webpack
You don't need to be working on a fancy, large-scale project to use Webpack. James Hibbard demonstrates how you can use it to...
Read more >terser-webpack-plugin/README.md
The CDN for terser-webpack-plugin. ... 129, // Exclude uglification for the `vendor` chunk ... 173, Enable file caching and set path to cache...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@fqborges here is the repo: https://github.com/thesame-/webpack-fix-style-only-entries-webpack-5-issue
@thesame- I’m facing the same issue, and yes, using [hash] every filename will change on each build.