Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

feat: babel-preset-remax 支持配置 typescript preset 参数 #420

Merged
merged 1 commit into from Nov 29, 2019

Conversation

Darmody
Copy link
Contributor

@Darmody Darmody commented Nov 27, 2019

resolve #417

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 27, 2019

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 826a720:

Sandbox Source
autumn-shadow-2kmdn Configuration

@Darmody Darmody changed the title feat: babel-preset-remax 支持配置 typescript 参数 feat: babel-preset-remax 支持配置 typescript preset 参数 Nov 27, 2019
@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 27, 2019

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ec06619:

Sandbox Source
wizardly-mclean-yeor9 Configuration

@codecov
Copy link

codecov bot commented Nov 27, 2019

Codecov Report

Merging #420 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #420      +/-   ##
==========================================
+ Coverage   97.32%   97.34%   +0.02%     
==========================================
  Files         296      297       +1     
  Lines        3214     3242      +28     
  Branches      340      349       +9     
==========================================
+ Hits         3128     3156      +28     
  Misses         84       84              
  Partials        2        2
Impacted Files Coverage Δ
packages/remax-cli/src/build/plugins/babel.ts 100% <100%> (ø)
packages/remax-cli/src/build/rollupConfig.ts 96.25% <100%> (ø) ⬆️
packages/remax-cli/src/build/plugins/postcssUrl.ts 100% <0%> (ø) ⬆️

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 b4dbbef...ec06619. Read the comment docs.

@yesmeck
Copy link
Member

yesmeck commented Nov 29, 2019

/rebase

@@ -0,0 +1,7 @@
module.exports = function(api) {
api.cache(true);
Copy link
Member

Choose a reason for hiding this comment

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

这是啥意思

Copy link
Contributor Author

Choose a reason for hiding this comment

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

];
const presets = [require('@babel/preset-env')];

if (typescript) {
Copy link
Member

Choose a reason for hiding this comment

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

这里好像永远都是 "true"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

没错

Copy link
Contributor Author

Choose a reason for hiding this comment

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

不对。用户可以主动传入 false
因为理论上不使用 typescript 的朋友可以关掉这个 preset

@yesmeck yesmeck merged commit 23939e1 into master Nov 29, 2019
@yesmeck yesmeck deleted the feat/customize-presets branch November 29, 2019 19:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[需求] 可以自定义或覆盖babel preset的参数
2 participants