You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DocsGPT/extensions/react-widget/vite.config.ts

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()],
});