mm
This commit is contained in:
@@ -1,16 +1,31 @@
|
||||
import { defineConfig } from "vite"
|
||||
import react from "@vitejs/plugin-react"
|
||||
import dts from "vite-plugin-dts"
|
||||
import { genIndexTsPlugin } from "./scripts-plugin/vite-plugin-gen-index-ts"
|
||||
import { genIndexCssPlugin } from "./scripts-plugin/vite-plugin-gen-index-css"
|
||||
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: [
|
||||
genIndexTsPlugin(),
|
||||
genIndexCssPlugin(),
|
||||
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,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user