Skip to content

Commit

Permalink
[v2] fix rollup config for cjs (#873)
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi authored Mar 23, 2024
1 parent d7d4a14 commit 69505ca
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -64,7 +63,7 @@ function createESMConfig(input, output) {
delimiters: ['\\b', '\\b(?!(\\.|/))'],
preventAssignment: true,
}),
getEsbuild('esm'),
getEsbuild(),
],
}
}
Expand All @@ -82,7 +81,7 @@ function createCommonJSConfig(input, output) {
delimiters: ['\\b', '\\b(?!(\\.|/))'],
preventAssignment: true,
}),
getEsbuild('cjs'),
getEsbuild(),
],
}
}
Expand Down

0 comments on commit 69505ca

Please sign in to comment.