When reading from webpack5 filesystem cache imported assets from css are not found
See original GitHub issue- Operating System: macOS
- Node Version: 12.14.1
- NPM Version: 6.13.4
- webpack Version: 5.4.0
- mini-css-extract-plugin Version: 1.3.0
Expected Behavior
When webpack is running from cache, output is the same as without.
Actual Behavior
When reading from cache assets imported from css are not found.
Code
https://github.com/piecyk/mini-css-extract-plugin-asset-cache-bug
How Do We Reproduce?
- checkout mini-css-extract-plugin-asset-cache-bug
- yarn webpack
- checkout output from ./dist
./dist/
├── index.html
├── main.css
├── main.js
└── static
└── webpack-logo.svg
- rm -rf ./dist/
- yarn webpack
- checkout output from ./dist
./dist/
├── index.html
├── main.css
└── main.js
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (11 by maintainers)
Top Results From Across the Web
Filesystem Cache is throwing TypeError: Cannot read property ...
Attempting to get the cache working for webpack 5. ... TypeError: Cannot read property 'length' of undefined from ResolverCachePlugin #11668.
Read more >Cache - webpack
Collect unused memory allocated during deserialization, only available when cache.type is set to 'filesystem' . This requires copying data into smaller ...
Read more >Asset caching with Webpack 5 loaders - Stack Overflow
I tried adding filesystem Webpack caching but the issue is that we use a single entry bundle, which imports everything at some point....
Read more >Migrating to Webpack 5 at smallcase - Medium
The module bundler now offers an opt-in filesystem cache which in turn ... To read more about all of the optimization features of...
Read more >Troubleshooting Common Errors - Gatsby
Gatsby keeps a cache of data and rendered assets in the .cache folder at the ... If you see errors about not being...
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 Free
Top 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
Maybe this helps, I don’t really have the time to make a test repo at the minute, sorry:
using
mini-css-extract-plugin@1.3.1
andwebpack@4.29.6
:Using
mini-css-extract-plugin@1.3.0
with the same webpack version and exactly same config works fine.Hope, we don’t break anything, anyway there is one way to check, release it 😄