store init

This commit is contained in:
2025-03-26 11:52:56 +08:00
parent b5dde4e823
commit 152fda350e
8 changed files with 266 additions and 12 deletions

24
react/vite.config.mjs Normal file
View File

@@ -0,0 +1,24 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
export default defineConfig({
build: {
lib: {
entry: './src/index.ts',
formats: ['es'],
},
emptyOutDir: true,
sourcemap: true,
rollupOptions: {
external: ['react', 'react-jsx-runtime', 'zustand'],
},
},
plugins: [
react(),
dts({
insertTypesEntry: true,
outputDir: './dist/types',
}),
],
});