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

fix: config extraBabelIncludes is absolute, nodeModules all transform #6632

Conversation

xiaohuoni
Copy link
Member

@xiaohuoni xiaohuoni commented May 25, 2021

修复当 extraBabelIncludes 配置的是绝对路径的时候,会自动编译所有的模块。
感觉应该是逻辑bug

举例子:
目录结构如下:

.
├── README.md
├── package.json
├── packages
│   ├── app
│   │   ├── package.json
│   │   └── pages
│   │       └── index.js
│   ├── footer
│   │   ├── index.jsx
│   │   └── package.json
│   └── head
│       ├── index.jsx
│       └── package.json
├── tsconfig.json
└── yarn.lock
import { defineConfig } from 'umi';
import { join } from 'path';

export default defineConfig({
  extraBabelIncludes: [
    join(__dirname, '../head'),
  ],
})

因为我没有配置了 footer,因此引用 footer 的文件应该报错才对,但是此时却全都正确运行了。

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

@codecov
Copy link

codecov bot commented May 25, 2021

Codecov Report

Merging #6632 (e56f5f6) into master (07402af) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6632   +/-   ##
=======================================
  Coverage   84.77%   84.77%           
=======================================
  Files         157      157           
  Lines        3599     3599           
  Branches      991      991           
=======================================
  Hits         3051     3051           
  Misses        538      538           
  Partials       10       10           
Impacted Files Coverage Δ
...ackages/bundler-webpack/src/getConfig/getConfig.ts 83.95% <100.00%> (ø)

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 07402af...e56f5f6. Read the comment docs.

@sorrycc
Copy link
Member

sorrycc commented May 25, 2021

circleci 里的用例为啥挂了?

@sorrycc
Copy link
Member

sorrycc commented May 25, 2021

image
从这个开始挂的。

@xiaohuoni
Copy link
Member Author

image
从这个开始挂的。

我今天会继续看这个问题。

@sorrycc sorrycc merged commit da26563 into master May 26, 2021
@delete-merged-branch delete-merged-branch bot deleted the fix-config-extraBabelIncludes-is-absolute-nodeModules-all-transform branch May 26, 2021 02:39
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