Skip to content

Commit

Permalink
feat: add __test__ to babel ignore (umijs#106)
Browse files Browse the repository at this point in the history
* feat: add __test__ to babel ignore

* test: add __test__ to test files
  • Loading branch information
rdmclin2 authored and sorrycc committed Sep 20, 2019
1 parent 505ebdf commit 722cd45
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,8 @@ export default {
### 关于 babel 模式

babel 模式下一些文件不会被编译到 es 和 lib 下,包含:

* __test__ 目录
* fixtures 目录
* mdx 文件
* 测试文件,比如 test.js、spec.js、e2e.js,后缀还支持 jsx、ts 和 tsx

Expand Down
1 change: 1 addition & 0 deletions packages/father-build/src/babel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export default async function(opts: IBabelOpts) {
createStream([
join(srcPath, '**/*'),
`!${join(srcPath, '**/fixtures/**/*')}`,
`!${join(srcPath, '**/__test__/**/*')}`,
`!${join(srcPath, '**/*.mdx')}`,
`!${join(srcPath, '**/*.+(test|e2e|spec).+(js|jsx|ts|tsx)')}`,
]).on('end', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default {};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default {};

0 comments on commit 722cd45

Please sign in to comment.