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), ], } }