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

Ensure babel transpilation cache is invalided when changing versions of babel plugins or AST transforms #841

Merged
merged 2 commits into from
Jun 11, 2021

Commits on Jun 9, 2021

  1. Fix Placeholder cache solution when used with requireFile

    Ensure we include the package’s version in the configuration, so that the babel-loader can detect module version changes in it’s cache key consideration. Without this, installing a new node_module may not result in babel-loaders cache expiration occurring.
    stefanpenner committed Jun 9, 2021
    Configuration menu
    Copy the full SHA
    51cdcfa View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2021

  1. Fix babel plugin cache eviction

    Today, babel’s caches (via babel-loader today) expires caches only if
    the options passed to it change, unfortunately if you upgrade a plugin
    without changing the configuration options and the file contents remains
    the same, the cache will not be evicted. This can lead to spurious
    caching problems if the associated plugins behavior has changed.
    
    To address this defect we now include (when available) the
    package.json#version of the babel plugins used in our own no-op babel
    plugin’s configuration. This new no-op plugin is then inserted at the
    end of the configuration in question.
    stefanpenner committed Jun 11, 2021
    Configuration menu
    Copy the full SHA
    e988688 View commit details
    Browse the repository at this point in the history