fix(vanilla,shallow): default export regression in CJS (#1531)

* fix(shallow): default export regression in CJS

* add vanilla
This commit is contained in:
Daishi Kato 2023-01-14 08:40:46 +09:00 committed by GitHub
parent 2274eb90b2
commit 4c5cddc9c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,7 +174,7 @@ module.exports = function (args) {
return [
...(c === 'index' ? [createDeclarationConfig(`src/${c}.ts`, 'dist')] : []),
createCommonJSConfig(`src/${c}.ts`, `dist/${c}`, {
addModuleExport: c === 'index',
addModuleExport: ['index', 'vanilla', 'shallow'].includes(c),
}),
createESMConfig(`src/${c}.ts`, `dist/esm/${c}.js`),
createESMConfig(`src/${c}.ts`, `dist/esm/${c}.mjs`),