Skip to content

Commit cbeb9f2

Browse files
committed
build: output es2020 (target node 14+) for cjs/server builds
1 parent efea4a8 commit cbeb9f2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: rollup.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ function createConfig(format, output, plugins = []) {
8484
process.env.__DEV__ === 'false' || /\.prod\.js$/.test(output.file)
8585
const isBundlerESMBuild = /esm-bundler/.test(format)
8686
const isBrowserESMBuild = /esm-browser/.test(format)
87+
const isServerRenderer = name === 'server-renderer'
8788
const isNodeBuild = format === 'cjs'
8889
const isGlobalBuild = /global/.test(format)
8990
const isCompatPackage = pkg.name === '@vue/compat'
@@ -106,6 +107,7 @@ function createConfig(format, output, plugins = []) {
106107
cacheRoot: path.resolve(__dirname, 'node_modules/.rts2_cache'),
107108
tsconfigOverride: {
108109
compilerOptions: {
110+
target: isServerRenderer || isNodeBuild ? 'es2020' : 'es2015',
109111
sourceMap: output.sourcemap,
110112
declaration: shouldEmitDeclarations,
111113
declarationMap: shouldEmitDeclarations

0 commit comments

Comments
 (0)