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

Add ability to cache-bust based on other files, ex .browserslistrc #121

Open
MagicDuck opened this issue Sep 12, 2022 · 0 comments
Open

Comments

@MagicDuck
Copy link

Changes to .browserlistrc file should invalidate the cache.
Those files can be added in the array that is the first argument to getCacheKeyFunction here:

jest/index.ts

Line 24 in 4c692f0

const cacheKeyFunction = getCacheKeyFunction([], [swcVersion, version, JSON.stringify(computedSwcOptions)])

Not sure if we want to hard code .browserlistrc since it's well known, or allow the list of files to be passed as an option to the jest transform. Ex:

module.exports = {
  transform: {
    '^.+\\.(t|j)sx?$': '@swc/jest',
    cacheBustFiles: [
      path.join(__dirname, '.browserslistrc'),
    ],
  },
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant