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: ✨ 新增targets配置,用于修改构建产物的兼容性 #549

Merged
merged 11 commits into from Dec 7, 2022

Conversation

huarse
Copy link
Contributor

@huarse huarse commented Nov 24, 2022

No description provided.

@fz6m
Copy link
Member

fz6m commented Nov 24, 2022

babel 和 esbuild 接受的 targets 格式不一样,check 一下格式会不会更好。

Copy link
Member

@PeachScript PeachScript left a comment

Choose a reason for hiding this comment

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

需要加一下用例,tests/fixtures/build/targets(umd/cjs/esm 正好对应 webpack/esbuild/babel)和 tests/fixtures/build/bundless-swc-targets(如果支持了的话)

docs/config.md Outdated Show resolved Hide resolved
docs/config.md Outdated Show resolved Hide resolved
docs/config.md Outdated Show resolved Hide resolved
docs/config.md Outdated Show resolved Hide resolved
src/builder/bundless/loaders/javascript/babel.ts Outdated Show resolved Hide resolved
@huarse
Copy link
Contributor Author

huarse commented Nov 25, 2022

需要加一下用例,tests/fixtures/build/targets(umd/cjs/esm 正好对应 webpack/esbuild/babel)和 tests/fixtures/build/bundless-swc-targets(如果支持了的话)

已添加

@huarse
Copy link
Contributor Author

huarse commented Nov 25, 2022

babel 和 esbuild 接受的 targets 格式不一样,check 一下格式会不会更好。

已统一为 string | string[]

已统一为 Record<string, number> ,与 umi 保持一致

docs/config.md Outdated Show resolved Hide resolved
docs/config.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Dec 7, 2022

Codecov Report

Base: 93.94% // Head: 93.97% // Increases project coverage by +0.03% 🎉

Coverage data is based on head (30bd2a1) compared to base (6451668).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #549      +/-   ##
==========================================
+ Coverage   93.94%   93.97%   +0.03%     
==========================================
  Files          51       51              
  Lines        1371     1378       +7     
  Branches      301      297       -4     
==========================================
+ Hits         1288     1295       +7     
  Misses         82       82              
  Partials        1        1              
Impacted Files Coverage Δ
src/builder/config.ts 98.48% <ø> (ø)
src/types.ts 100.00% <ø> (ø)
src/builder/bundle/index.ts 88.88% <100.00%> (ø)
src/builder/bundless/loaders/javascript/babel.ts 92.10% <100.00%> (-0.58%) ⬇️
src/builder/bundless/loaders/javascript/esbuild.ts 94.28% <100.00%> (-0.16%) ⬇️
src/builder/bundless/loaders/javascript/swc.ts 78.12% <100.00%> (-0.98%) ⬇️
src/builder/utils.ts 100.00% <100.00%> (ø)
src/features/configPlugins/schema.ts 93.10% <100.00%> (+0.24%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@PeachScript PeachScript merged commit 3dbe137 into umijs:master Dec 7, 2022
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.

None yet

3 participants