-
-
Notifications
You must be signed in to change notification settings - Fork 451
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
Changes to .browserslistrc does not invalidate cache #690
Comments
We could potentially special-case this in |
That sounds great! I wasn't aware of that effort, but seems like it definitely would be the better solution |
This PR was merged into the master branch. Discussion ---------- Don't use babel-loader's cacheDirectory for production Currently `cacheDirectory` is always set to `true` in `babel-loader`'s options. This can be an issue because the cache identifier is only based on direct Babel options, but not on external configs such as `.browserslistrc` files or if a `browserslist` key was added to the `package.json` (see babel/babel-loader#690). Disabling that cache entirely in Encore while waiting for a proper solution in `babel` or `babel-loader` would probably not be a good idea, but we could mitigate the problem by disabling it only for the prod environment. Closes #514 Commits ------- ae74298 Don't use babel-loader's cacheDirectory for production
this speeds up repeated webpack builds by around 20%. It will use the default cache directory `node_modules/.cache/babel-loader`. Also added cache invalidation to workaround babel/babel-loader#690
this speeds up repeated webpack builds by around 20%. It will use the default cache directory `node_modules/.cache/babel-loader`. Also added cache invalidation to workaround babel/babel-loader#690
FYI the PR related to the bug babel/babel#8497 mentioned by @loganfsmyth is having some activity these days: babel/babel#11741. 🤞 Edit: planned for babel 7.17. |
Is this issue still valid? |
Is this still an issue with babel/babel#14065 ? |
I'm submitting a bug report
There seems to have been an existing issue #587 related to changes in .babelrc. It looks like it was fixed for .babelrc, but with
@babel/preset-env@7.0.0
, changes to .browserslistrc can also affect what babel should be outputting.Webpack Version:
4.20.2
Babel Core Version:
7.1.0
Babel Loader Version:
8.0.2
Please tell us about your environment:
OSX 10.13.6
Current behavior:
When using
cacheDirectory: true
, the cache does not get invalidated between changes to .browserslistrc contents. Disabling the cache works as expected and changes to .browserslistrc are reflected in the generated bundle.Expected/desired behavior:
When using
cacheDirectory: true
, the cache should be invalidated between changes to the .browserslistrc fileConfiguration
The text was updated successfully, but these errors were encountered: