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

Commit

Permalink
fix: 修复 async 语法解析错误的问题 (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
yesmeck committed Dec 9, 2019
1 parent 2a652c2 commit c45ba2b
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 7 deletions.
Expand Up @@ -13,7 +13,6 @@ export default function fixRegeneratorRuntime(): Plugin {
transform(code) {
const magicString = new MagicString(code);
const ast = this.parse(code, {
ecmaVersion: 6,
sourceType: 'module',
});

Expand Down
Expand Up @@ -53,7 +53,6 @@ export default (

const magicString = new MagicString(code);
const ast = this.parse(code, {
ecmaVersion: 6,
sourceType: 'module',
});

Expand Down
1 change: 0 additions & 1 deletion packages/remax-cli/src/build/plugins/removeSrc.ts
Expand Up @@ -102,7 +102,6 @@ export default function removeSrc(options: RemaxOptions): Plugin {
if (module.code) {
const magicString = new MagicString(module.code);
const ast = this.parse(module.code, {
ecmaVersion: 6,
sourceType: 'module',
});

Expand Down
1 change: 0 additions & 1 deletion packages/remax-cli/src/build/plugins/rename.ts
Expand Up @@ -136,7 +136,6 @@ export default function rename(options: RenameExtensionsOptions): Plugin {
if (file.code) {
const magicString = new MagicString(file.code);
const ast = this.parse(file.code, {
ecmaVersion: 6,
sourceType: 'module',
});

Expand Down
2 changes: 0 additions & 2 deletions packages/remax-cli/src/build/plugins/stub.ts
Expand Up @@ -23,7 +23,6 @@ export default function stub(options: Options = {}): Plugin {
}

let ast = this.parse(code, {
ecmaVersion: 6,
sourceType: 'module',
});

Expand Down Expand Up @@ -66,7 +65,6 @@ export default function stub(options: Options = {}): Plugin {
code = magicString.toString();
const map = options.sourceMap ? magicString.generateMap() : null;
ast = this.parse(code, {
ecmaVersion: 6,
sourceType: 'module',
});

Expand Down
1 change: 0 additions & 1 deletion packages/remax-cli/src/build/plugins/template.ts
Expand Up @@ -213,7 +213,6 @@ function isRemaxEntry(chunk: any): chunk is OutputChunk {
}

const ast: any = parse(chunk.code, {
ecmaVersion: 6,
sourceType: 'module',
});

Expand Down

0 comments on commit c45ba2b

Please sign in to comment.