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

feat: support babel runtime version #239

Merged
merged 2 commits into from Jul 30, 2020
Merged

feat: support babel runtime version #239

merged 2 commits into from Jul 30, 2020

Conversation

afc163
Copy link
Contributor

@afc163 afc163 commented Jul 30, 2020

Checklist
  • npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change

close #224

参考 babel/babel#10261

开启 version 参数,解决 ownKeys_objectSpread 没有走 @babel/runtime 的问题。比如:https://unpkg.com/browse/rc-select@11.1.0/es/generate.js

@afc163 afc163 changed the base branch from master to 2.x July 30, 2020 07:00
@afc163 afc163 requested a review from sorrycc July 30, 2020 07:44
var _classCallCheck2 = _interopRequireDefault(
require("@babel/runtime/helpers/classCallCheck")
);
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不开启 version,这个不会走 @babel/runtime

@codecov
Copy link

codecov bot commented Jul 30, 2020

Codecov Report

Merging #239 into 2.x will increase coverage by 0.17%.
The diff coverage is 78.78%.

Impacted file tree graph

@@            Coverage Diff             @@
##              2.x     #239      +/-   ##
==========================================
+ Coverage   73.39%   73.56%   +0.17%     
==========================================
  Files          16       16              
  Lines         466      469       +3     
  Branches      158      160       +2     
==========================================
+ Hits          342      345       +3     
  Misses        123      123              
  Partials        1        1              
Impacted Files Coverage Δ
packages/father-build/src/babel.ts 75.60% <77.41%> (+0.60%) ⬆️
packages/father-build/src/getBabelConfig.ts 93.54% <100.00%> (+0.21%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 296a2c8...e08b41e. Read the comment docs.

@sorrycc sorrycc merged commit 2d55c6a into 2.x Jul 30, 2020
@delete-merged-branch delete-merged-branch bot deleted the babel-runtime-version branch July 30, 2020 07:51
@afc163
Copy link
Contributor Author

afc163 commented Jul 30, 2020

依赖多的时候可以进一步优化打包体积:ant-design/ant-design#22698

@sorrycc
Copy link
Member

sorrycc commented Jul 30, 2020

  • father-build@1.18.2
  • father@2.29.6

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

Successfully merging this pull request may close these issues.

[Feature Request] babel runtime helpers for ownKeys and _objectSpread
2 participants