Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bugfix] Ensure stability of filename cache-keys
`JSON.stringify(structure)` isn’t inherently stable as it relies on various internal details of how `structure` was created. As written, if a given babel configuration is create in an dynamic manner, it is possible for babel-loader to have spurious cache misses. To address this, we can use one of the many stable stringify alternatives. For this PR I have selected [fast-stable-stringify](https://www.npmjs.com/package/fast-stable-stringify) for that task, as it appears both popular and it’s benchmarks look promising. This PR does not explicitly include tests, as testing this is both tricky to test in this context, and the important tests are contained within fast-stable-stringify itself.
- Loading branch information