-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Remove deprecated cache-loader #6634
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
base: dev
Are you sure you want to change the base?
Conversation
I started testing this locally today and haven't run into any issues. |
e0d3d7e
to
9f6ebb1
Compare
Not sure why the The |
@sodatea Can I get your feedback on this PR? |
@@ -18,6 +18,9 @@ module.exports = (api, options) => { | |||
.rule('esm') | |||
.test(/\.m?jsx?$/) | |||
.resolve.set('fullySpecified', false) | |||
|
|||
webpackConfig | |||
.cache({ type: 'filesystem' }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't do this. It's not safe. I'm pretty sure it'll fail at least one of these test cases:
https://github.com/sodatea/vue-cli/blob/e3cfcf57a30bb58ccc7895fe1d3242fcef797501/packages/%40vue/cli-service/__tests__/cache.spec.js#L32-L61
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback! I appreciate it.
It's not explicitly stated in the documentation, but the spec for caching in webpack 5 states:
Each build with a different webpack configuration should store a unique copy of its cache versus another webpack configuration. E.g. A development build and a production build must have distinct caches due to them having different options set.
The spec for it is here: webpack/webpack#6527
I'm not sure how the --mode
option works in vue-cli, but it does look like those specific tests did not fail for this PR. You can see the reports for those here: https://app.circleci.com/pipelines/github/vuejs/vue-cli/1124/workflows/10aeafe8-27a2-486a-9609-2111481209be/jobs/27240
The only two tests that failed do not seem to be related to the changes I made.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link points to another PR that I'm working on.
The tests are not written yet, therefore it's not in the pipeline.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only two tests that failed do not seem to be related to the changes I made.
I'm afraid they're related. Looks like the build process for modern mode reused the cache from the legacy mode.
Is this issue going to be solved prior to v5 final release? Given that it's currently in RC status (v5.0.0-rc.1), I hope it is something that gets resolved prior to release. |
any update on this issiue? |
Any update on this issue? Again. |
vue-cli is now in maintenance mode, so don't hold your breath. |
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
Other information:
The cache-loader library is deprecated. It still runs on webpack 5, but it has a peerDependency on webpack 4 which breaks the installation of vue-cli with npm@7 (npm installs peerDependencies by default now).
This PR removes the dependency on cache-loader and adds webpack's new filesystem cache instead.