Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix] Ensure stability of filename cache-keys #909

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Jun 11, 2021

  1. [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.
    stefanpenner committed Jun 11, 2021
    Configuration menu
    Copy the full SHA
    fde5dfd View commit details
    Browse the repository at this point in the history