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

refactor: use babel overrides to transpile babel runtime helpers #4777

Merged
merged 6 commits into from
Nov 4, 2019

Conversation

haoqunjiang
Copy link
Member

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.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:

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.
@haoqunjiang haoqunjiang merged commit 759d77f into vuejs:dev Nov 4, 2019
@haoqunjiang haoqunjiang deleted the babel-size branch November 4, 2019 08:29
@haoqunjiang
Copy link
Member Author

Should have also fixed #2837

@viniciuskneves
Copy link

I was migrating to Vue CLI 4 manually and I think this option is not documented here: https://github.com/vuejs/vue-cli/tree/v4.2.3/packages/@vue/babel-preset-app

Am I looking at the right place or is it documented somewhere else?

@haoqunjiang
Copy link
Member Author

I think there are no new options introduced in this PR.

@viniciuskneves
Copy link

I think there are no new options introduced in this PR.

Beeeh, wrong PR. I was supposed to comment here: #4797

Gonna comment there 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

core-js and core-js-pure import duplication 3.7.0 breaks codesandbox template
2 participants