25 lines
654 B
TypeScript
25 lines
654 B
TypeScript
![]() |
import react from '@vitejs/plugin-react';
|
||
|
import { resolve } from "path";
|
||
|
import { defineConfig } from 'vite';
|
||
|
import dts from 'vite-plugin-dts';
|
||
|
|
||
|
// https://vitejs.dev/config/
|
||
|
export default defineConfig({
|
||
|
plugins: [react(), dts({ include: ["lib"] })],
|
||
|
build: {
|
||
|
lib: {
|
||
|
entry: resolve(__dirname, "lib/index.ts"),
|
||
|
formats: ["es"]
|
||
|
},
|
||
|
copyPublicDir: false,
|
||
|
rollupOptions: {
|
||
|
external: ["axios", "react", "react-dom", "zustand"],
|
||
|
// output: {
|
||
|
// globals: {
|
||
|
// react: "TODO"
|
||
|
// },
|
||
|
// },
|
||
|
},
|
||
|
}
|
||
|
});
|