Skip to content

Commit 453b3a6

Browse files
authored
build: target es2018 (#2361)
1 parent 9cb1c67 commit 453b3a6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

rollup.config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ function getBabelOptions(targets) {
2525
}
2626
}
2727

28-
function getEsbuild(target, env = 'development') {
28+
function getEsbuild(env = 'development') {
2929
return esbuild({
3030
minify: env === 'production',
31-
target,
31+
target: 'es2018',
32+
supported: { 'import-meta': true },
3233
tsconfig: path.resolve('./tsconfig.json'),
3334
})
3435
}
@@ -73,7 +74,7 @@ function createESMConfig(input, output) {
7374
delimiters: ['\\b', '\\b(?!(\\.|/))'],
7475
preventAssignment: true,
7576
}),
76-
getEsbuild('node12'),
77+
getEsbuild(),
7778
],
7879
}
7980
}
@@ -162,7 +163,7 @@ function createSystemConfig(input, output, env) {
162163
delimiters: ['\\b', '\\b(?!(\\.|/))'],
163164
preventAssignment: true,
164165
}),
165-
getEsbuild('node12', env),
166+
getEsbuild(env),
166167
],
167168
}
168169
}

0 commit comments

Comments
 (0)