build: target es2018 (#2361)

This commit is contained in:
Daishi Kato 2024-03-02 11:26:23 +09:00 committed by GitHub
parent 9cb1c67827
commit 453b3a65f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,10 +25,11 @@ function getBabelOptions(targets) {
}
}
function getEsbuild(target, env = 'development') {
function getEsbuild(env = 'development') {
return esbuild({
minify: env === 'production',
target,
target: 'es2018',
supported: { 'import-meta': true },
tsconfig: path.resolve('./tsconfig.json'),
})
}
@ -73,7 +74,7 @@ function createESMConfig(input, output) {
delimiters: ['\\b', '\\b(?!(\\.|/))'],
preventAssignment: true,
}),
getEsbuild('node12'),
getEsbuild(),
],
}
}
@ -162,7 +163,7 @@ function createSystemConfig(input, output, env) {
delimiters: ['\\b', '\\b(?!(\\.|/))'],
preventAssignment: true,
}),
getEsbuild('node12', env),
getEsbuild(env),
],
}
}