Skip to content

Commit

Permalink
build: target es2018 (#2361)
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi authored Mar 2, 2024
1 parent 9cb1c67 commit 453b3a6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
})
}
Expand Down Expand Up @@ -73,7 +74,7 @@ function createESMConfig(input, output) {
delimiters: ['\\b', '\\b(?!(\\.|/))'],
preventAssignment: true,
}),
getEsbuild('node12'),
getEsbuild(),
],
}
}
Expand Down Expand Up @@ -162,7 +163,7 @@ function createSystemConfig(input, output, env) {
delimiters: ['\\b', '\\b(?!(\\.|/))'],
preventAssignment: true,
}),
getEsbuild('node12', env),
getEsbuild(env),
],
}
}
Expand Down

0 comments on commit 453b3a6

Please sign in to comment.