Skip to content

Commit

Permalink
[v5] fix rollup config for cjs (#2433)
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi authored Mar 23, 2024
1 parent 4ac0950 commit 172ae1c
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 @@ -67,7 +66,7 @@ function createESMConfig(input, output) {
delimiters: ['\\b', '\\b(?!(\\.|/))'],
preventAssignment: true,
}),
getEsbuild('esm'),
getEsbuild(),
],
}
}
Expand All @@ -85,7 +84,7 @@ function createCommonJSConfig(input, output) {
delimiters: ['\\b', '\\b(?!(\\.|/))'],
preventAssignment: true,
}),
getEsbuild('cjs'),
getEsbuild(),
],
}
}
Expand Down

0 comments on commit 172ae1c

Please sign in to comment.