build: target es2019/node 12 for node dist files

close #5957
This commit is contained in:
Evan You 2022-05-20 23:25:54 +08:00
parent 80de1adb36
commit cf55480163

View File

@ -107,7 +107,7 @@ function createConfig(format, output, plugins = []) {
cacheRoot: path.resolve(__dirname, 'node_modules/.rts2_cache'), cacheRoot: path.resolve(__dirname, 'node_modules/.rts2_cache'),
tsconfigOverride: { tsconfigOverride: {
compilerOptions: { compilerOptions: {
target: isServerRenderer || isNodeBuild ? 'es2020' : 'es2015', target: isServerRenderer || isNodeBuild ? 'es2019' : 'es2015',
sourceMap: output.sourcemap, sourceMap: output.sourcemap,
declaration: shouldEmitDeclarations, declaration: shouldEmitDeclarations,
declarationMap: shouldEmitDeclarations declarationMap: shouldEmitDeclarations