-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
core-js and core-js-pure import duplication #4742
Comments
Seems a bug in I don't have the time to fully investigate this problem today, but here are a few references to read about our approach:
If anyone comes up with a solution, a pull request would be much appreciated. |
haoqunjiang
added a commit
to haoqunjiang/vue-cli
that referenced
this issue
Oct 30, 2019
As recommended in babel/babel#9903. Get rid of the module-resolver plugin, may fix vuejs#3928. Seems to have fixed vuejs#4742 as well.
9 tasks
haoqunjiang
added a commit
that referenced
this issue
Nov 4, 2019
* refactor: use babel overrides to transpile babel runtime helpers As recommended in babel/babel#9903. Get rid of the module-resolver plugin, may fix #3928. Seems to have fixed #4742 as well. There may be a small breaking change: as we now use `excludes` & `includes`, babel requires `filename` option to be present (introduced in https://github.com/babel/babel/pull/10181/files). So users who call `babel.transformSync` directly may encounter an error. However, as we explicitly stated that this preset is only used for Vue CLI internally, I don't expect too many such use cases there. And the error messages are clear enough. Considering the benefits that this PR brings, I think it's an acceptable tradeoff. test: update tests for babel * test: fix windows tests * test: remove unused variables * fix: fix scope package paths on Windows * test: wait some time in router tests in case dom hasn't updated in time
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
4.0.4
Environment info
Steps to reproduce
Create a brand new project with Vue CLI 4.
Install webpack-bundle-analyzer and build. Only core-js is included in the bundle.
Open src/main.js and add the following to the Vue instance:
Build with webpack-bundle-analyzer again. Now both core-js and core-js-pure are imported and there are a lot of duplicated imports between them.
What is expected?
Do not duplicate imports from core-js and core-js-pure.
What is actually happening?
The same imports are duplicated between core-js and core-js-pure.
Is this actually a bug or is it intended? I'm reporting it as a bug since it doesn't seem normal to me and I didn't have such problems with Vue CLI 3. I'd be happy if someone explained the reasoning behind this.
The text was updated successfully, but these errors were encountered: