Skip to content

Commit

Permalink
fix: config extraBabelIncludes is absolute, nodeModules all transform (
Browse files Browse the repository at this point in the history
…#6632)

* fix: config extraBabelIncludes is absolute, nodeModules all transform

* chore: add jest test

* fix: JavaScript heap out of memory

* chore: code style

* fix: windows set NODE_OPTIONS

* fix: window set NODE_OPTIONS

* fix: ci JavaScript heap out of memory

* chore: add github ci NODE_OPTIONS

* fix: github ci env

* fix: ci
  • Loading branch information
xiaohuoni committed May 26, 2021
1 parent 3e4c380 commit da26563
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Expand Up @@ -43,3 +43,4 @@ jobs:
HEADLESS: false
PROGRESS: none
NODE_ENV: test
NODE_OPTIONS: --max_old_space_size=4071
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Expand Up @@ -35,7 +35,7 @@ jobs:
displayName: install
- script: yarn build
displayName: build
- script: yarn test --forceExit --detectOpenHandles --maxWorkers=4
- script: set NODE_OPTIONS='--max-old-space-size=4071' && yarn test --forceExit --detectOpenHandles --maxWorkers=2
env:
PROGRESS: none
CI: true
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
- script: yarn --frozen-lockfile
- script: yarn build
displayName: build
- script: yarn test --forceExit --detectOpenHandles --maxWorkers=4
- script: NODE_OPTIONS='--max-old-space-size=4071' yarn test --forceExit --detectOpenHandles --maxWorkers=4
env:
PROGRESS: none
CI: true
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
- script: yarn --frozen-lockfile
- script: yarn build
displayName: build
- script: yarn test --forceExit --detectOpenHandles --maxWorkers=4
- script: NODE_OPTIONS='--max-old-space-size=4071' yarn test --forceExit --detectOpenHandles --maxWorkers=4
env:
PROGRESS: none
CI: true
Expand Down
@@ -0,0 +1,6 @@

export default () => {
let too = 1;
too += 1;
return too;
}
Expand Up @@ -4,4 +4,6 @@ export default ({ indexJS }: IExpectOpts) => {
expect(indexJS).toContain('var bar = 1;');
expect(indexJS).toContain('var foo = 1;');
expect(indexJS).toContain('var hoo = 1;');
expect(indexJS).toContain('let too = 1;');
expect(indexJS).not.toContain('var too = 1;');
};
Expand Up @@ -3,7 +3,9 @@ import bar from 'bar/bar';
// @ts-ignore
import foo from 'foo/foo';
import hoo from '../.extraBabelIncludes/hoo';
import too from '../.noExtraBabelIncludes/too';

bar();
foo();
hoo();
too();
2 changes: 1 addition & 1 deletion packages/bundler-webpack/src/getConfig/getConfig.ts
Expand Up @@ -217,7 +217,7 @@ export default async function getConfig(
.add((a: any) => {
// 支持绝对路径匹配
if (isAbsolute(include)) {
return isAbsolute(include);
return a.includes(include);
}

// 支持 node_modules 下的 npm 包
Expand Down

0 comments on commit da26563

Please sign in to comment.