Skip to content

Commit 091a032

Browse files
committed
chore(poc): update package and vite config, optimized lib imports
1 parent 7d966fe commit 091a032

File tree

7 files changed

+6
-24
lines changed

7 files changed

+6
-24
lines changed

lib/components/Button/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/components/Input/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/components/Label/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/components/index.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

lib/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export { Button } from './components/Button'
2-
export { Input } from './components/Input'
3-
export { Label } from './components/Label'
1+
export { Button } from './components/Button/Button'
2+
export { Input } from './components/Input/Input'
3+
export { Label } from './components/Label/Label'

lib/vite-env.d.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

vite.config.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export default defineConfig({
2828
lib: {
2929
entry: resolve(__dirname, 'lib/main.ts'),
3030
formats: ['es'],
31-
name: 'teste',
32-
fileName: 'teste',
31+
name: 'react-lib',
32+
fileName: 'react-lib',
3333
},
3434
rollupOptions: {
3535
external: ['react', 'react-dom', 'react/jsx-runtime'],
@@ -42,13 +42,8 @@ export default defineConfig({
4242
]),
4343
),
4444
output: {
45-
// assetFileNames: 'assets/[name][extname]',
46-
assetFileNames: 'components/[name][extname]',
45+
assetFileNames: 'components/[name]/[name][extname]',
4746
entryFileNames: '[name].js',
48-
// globals: {
49-
// react: 'React',
50-
// 'react-dom': 'ReactDOM',
51-
// },
5247
},
5348
},
5449
},

0 commit comments

Comments
 (0)