Skip to content

Commit b92ff73

Browse files
xuefei1313xile611
authored andcommittedAug 11, 2023
chore: update local release scripts
1 parent 6ed7071 commit b92ff73

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed
 

‎share/ts-config/tsconfig.base.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "ES2018",
3+
"target": "ES2016",
44
"experimentalDecorators": true,
55
"strict": true,
66
"noImplicitAny": true,

‎tools/bundler/src/bootstrap.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ async function bootstrap() {
8888

8989
if (Array.isArray(config.formats) && config.formats) {
9090
const subBuildTasks: string[] = [];
91-
const moduleKind: Record<'es' | 'cjs', 'esnext' | 'commonjs'> = {
92-
es: 'esnext',
91+
const moduleKind: Record<'es' | 'cjs', 'es2015' | 'commonjs'> = {
92+
es: 'es2015', // default module of es is 'es2015'
9393
cjs: 'commonjs'
9494
};
9595
config.formats.forEach((format: _ModuleKind) => {

‎tools/bundler/src/tasks/modules.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,26 @@ import { DebugCompile, DebugConfig } from '../logic/debug';
1414
import { alias } from '../logic/alias';
1515

1616
export function getTSCompilerOptions(
17-
moduleKind: 'esnext' | 'commonjs',
17+
moduleKind: 'esnext' | 'commonjs' | 'es2015',
1818
userTSCompilerOptions: Record<string, unknown> = {},
1919
noEmitOnError: boolean
2020
): Settings {
2121
delete userTSCompilerOptions.outDir;
22-
return {
22+
const res: Settings = {
2323
moduleResolution: 'node',
2424
target: 'es2016',
25-
...userTSCompilerOptions,
2625
noEmit: false,
2726
emitDeclarationOnly: false,
2827
declaration: true,
2928
isolatedModules: false,
3029
allowSyntheticDefaultImports: true,
3130
module: moduleKind,
3231
skipLibCheck: true,
33-
noEmitOnError: noEmitOnError
32+
noEmitOnError: noEmitOnError,
33+
...userTSCompilerOptions
3434
};
35+
36+
return res;
3537
}
3638

3739
// getTSCompilerOptions(ModuleKind.ESNext)

0 commit comments

Comments
 (0)
Please sign in to comment.