32 lines
635 B
TypeScript
32 lines
635 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import dts from "vite-plugin-dts";
|
|
import typescript from "@rollup/plugin-typescript";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
dts({
|
|
insertTypesEntry: true,
|
|
}),
|
|
],
|
|
|
|
esbuild: false,
|
|
|
|
build: {
|
|
rollupOptions: {
|
|
plugins: [typescript({ tsconfig: "./tsconfig.build.json" })],
|
|
external: ["react", "react-dom", "react/jsx-runtime"],
|
|
output: {
|
|
globals: {
|
|
react: "React",
|
|
"react-dom": "ReactDOM",
|
|
},
|
|
},
|
|
},
|
|
|
|
sourcemap: true,
|
|
cssCodeSplit: true,
|
|
},
|
|
});
|