fix: cjs build only

This commit is contained in:
Hossein Mehrabi 2023-05-24 15:44:51 +03:30
parent c05904a909
commit 37991faa3a
2 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,7 @@
"name": "@acid-info/lsd-react", "name": "@acid-info/lsd-react",
"version": "0.1.0-alpha.5", "version": "0.1.0-alpha.5",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
"main": "./dist/lsd-react.mjs", "main": "./dist/lsd-react.js",
"require": "./dist/lsd-react.umd.js", "require": "./dist/lsd-react.umd.js",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -24,6 +24,7 @@ export default defineConfig({
entry: path.resolve(__dirname, './src/index.ts'), entry: path.resolve(__dirname, './src/index.ts'),
name: 'lsd-react', name: 'lsd-react',
fileName: 'lsd-react', fileName: 'lsd-react',
formats: ['cjs', 'umd'],
}, },
rollupOptions: { rollupOptions: {
external: ['react', 'react-dom', '@emotion/styled', '@emotion/react'], external: ['react', 'react-dom', '@emotion/styled', '@emotion/react'],