From 172ae1cdcf7bcd9ffdc76d981d8406cc7ef85406 Mon Sep 17 00:00:00 2001 From: Daishi Kato Date: Sat, 23 Mar 2024 13:04:00 +0900 Subject: [PATCH] [v5] fix rollup config for cjs (#2433) --- rollup.config.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index 82b17c1d72..675bdf3edf 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -18,9 +18,8 @@ function external(id) { return !id.startsWith('.') && !id.startsWith(root) } -function getEsbuild(format) { +function getEsbuild() { return esbuild({ - format, target: 'es2018', supported: { 'import-meta': true }, tsconfig: path.resolve('./tsconfig.json'), @@ -67,7 +66,7 @@ function createESMConfig(input, output) { delimiters: ['\\b', '\\b(?!(\\.|/))'], preventAssignment: true, }), - getEsbuild('esm'), + getEsbuild(), ], } } @@ -85,7 +84,7 @@ function createCommonJSConfig(input, output) { delimiters: ['\\b', '\\b(?!(\\.|/))'], preventAssignment: true, }), - getEsbuild('cjs'), + getEsbuild(), ], } }