From f734270a1c209c4cd0211d47ee28a24b59f5773c Mon Sep 17 00:00:00 2001 From: daishi Date: Sat, 23 Mar 2024 12:54:31 +0900 Subject: [PATCH] [v2] fix rollup config for cjs --- rollup.config.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index c1020cc6..b0dc7d3d 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'), @@ -64,7 +63,7 @@ function createESMConfig(input, output) { delimiters: ['\\b', '\\b(?!(\\.|/))'], preventAssignment: true, }), - getEsbuild('esm'), + getEsbuild(), ], } } @@ -82,7 +81,7 @@ function createCommonJSConfig(input, output) { delimiters: ['\\b', '\\b(?!(\\.|/))'], preventAssignment: true, }), - getEsbuild('cjs'), + getEsbuild(), ], } }