mirror of
https://github.com/arc53/DocsGPT
synced 2024-11-03 23:15:37 +00:00
27 lines
595 B
TypeScript
27 lines
595 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react-swc";
|
|
import dts from "vite-plugin-dts";
|
|
import path from "path";
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
lib: {
|
|
entry: path.resolve(__dirname, "index.ts"),
|
|
name: "ViteButton",
|
|
fileName: (format) => `index.${format}.js`,
|
|
},
|
|
rollupOptions: {
|
|
external: ["react", "react-dom"],
|
|
output: {
|
|
globals: {
|
|
react: "React",
|
|
"react-dom": "ReactDOM",
|
|
},
|
|
},
|
|
},
|
|
sourcemap: true,
|
|
emptyOutDir: true,
|
|
},
|
|
plugins: [react(), dts()],
|
|
});
|