question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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?

  1. checkout mini-css-extract-plugin-asset-cache-bug
  2. yarn webpack
  3. checkout output from ./dist
./dist/
├── index.html
├── main.css
├── main.js
└── static
    └── webpack-logo.svg
  1. rm -rf ./dist/
  2. yarn webpack
  3. checkout output from ./dist
./dist/
├── index.html
├── main.css
└── main.js

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
Varediscommented, Nov 20, 2020

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 and webpack@4.29.6:

image

Using mini-css-extract-plugin@1.3.0 with the same webpack version and exactly same config works fine.

1reaction
alexander-akaitcommented, Nov 12, 2020

Hope, we don’t break anything, anyway there is one way to check, release it 😄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found