fix(build): re-export createStore from index (#1661)

* fix: re-export createStore from index

* fix: use vanilla.createStore instead of exports.vanilla.createStore
This commit is contained in:
Hiển Đào Vinh 2023-02-28 18:09:50 +07:00 committed by GitHub
parent de74f2e32d
commit 0c153cac18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,7 +193,12 @@ module.exports = function (args) {
...(c === 'index' ? [createDeclarationConfig(`src/${c}.ts`, 'dist')] : []),
createCommonJSConfig(`src/${c}.ts`, `dist/${c}`, {
addModuleExport: {
index: { default: 'react', create: 'create', useStore: 'useStore' },
index: {
default: 'react',
create: 'create',
useStore: 'useStore',
createStore: 'vanilla.createStore',
},
vanilla: { default: 'vanilla', createStore: 'createStore' },
shallow: { default: 'shallow$1', shallow: 'shallow' },
}[c],