From 453b3a65f808a7b43fab3a68edda680344af3e45 Mon Sep 17 00:00:00 2001 From: Daishi Kato Date: Sat, 2 Mar 2024 11:26:23 +0900 Subject: [PATCH] build: target es2018 (#2361) --- rollup.config.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index 2ad17f5e35..dd77d24ab0 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -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), ], } }