mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
[v5] fix rollup config for cjs (#2433)
This commit is contained in:
parent
4ac0950e71
commit
172ae1cdcf
@ -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(),
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user