Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

Use relative path on this.fs.stat returns stale metadata #86

Open
mistic opened this issue Jun 25, 2019 · 0 comments
Open

Use relative path on this.fs.stat returns stale metadata #86

mistic opened this issue Jun 25, 2019 · 0 comments

Comments

@mistic
Copy link
Collaborator

mistic commented Jun 25, 2019

  • Operating System: macOS 10.14.5
  • Node Version: 10.15.2
  • NPM Version: 6.9.0
  • webpack Version: 4.23.1
  • cache-loader Version: 4.0.0

Expected Behavior

When using cache-loader configured with cacheContext under a webpack in watch and running a development configuration, it was expected to have the final bundles always in sync with the changed source files.

Actual Behavior

In the above mentioned cache-loader version when cacheContext is used some relative paths are being used when calling this.fs.stat. That call would sometimes return wrong stale metadata and the cache-loader would return the cached results for that file instead of the ones newly changed on disk.

How Do We Reproduce?

Just use the mentioned cache-loader version in a simple application configured with webpack in watch mode running a development configuration. Start changing the source files and you'll see that sometimes, despite having webpack running the compilation, the bundles are not updated correctly with the last changes on disk.

This is a bug fixed by #83 but we might want to further investigate the cause for this directly in webpack/webpack dependencies that's why I'm opening that issue.

/CC @evilebottnawi

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants