Skip to content

Commit

Permalink
fix(generator): 修复 tsc 构建 target 问题
Browse files Browse the repository at this point in the history
  • Loading branch information
FoliageOwO committed Oct 1, 2023
1 parent 8ff0478 commit a5730dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function getAllFilePaths(directoryPath: string): string[] {
writeFileSync(distFile, result, "utf-8");

// 执行编译
exec(`tsc ${distFile} --noEmitHelpers`, (_, stdout) => {
exec(`tsc ${distFile} --noEmitHelpers --target ES2017`, (_, stdout) => {
for (const line of stdout.split("\n")) {
if (line.lastIndexOf("Cannot find name") === -1) {
console.log(line);
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"moduleResolution": "NodeNext",
"target": "ESNext",
"target": "ES2017",
"module": "NodeNext",
"noEmitHelpers": true
}
Expand Down

1 comment on commit a5730dc

@vercel
Copy link

@vercel vercel bot commented on a5730dc Oct 1, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

fqj – ./

fqj.vercel.app
fqj-git-master-windleaf233.vercel.app
fqj-windleaf233.vercel.app

Please sign in to comment.