mm
This commit is contained in:
43
apps/manga-grabber/vite.config.ts
Normal file
43
apps/manga-grabber/vite.config.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
import dts from "vite-plugin-dts";
|
||||
import path from "path";
|
||||
import { genIndexTsPlugin } from "./scripts-plugin/vite-plugin-gen-index-ts";
|
||||
import { genIndexCssPlugin } from "./scripts-plugin/vite-plugin-gen-index-css";
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
genIndexTsPlugin(),
|
||||
genIndexCssPlugin(),
|
||||
react(),
|
||||
dts({
|
||||
insertTypesEntry: true,
|
||||
}),
|
||||
],
|
||||
|
||||
build: {
|
||||
lib: {
|
||||
entry: path.resolve(__dirname, "src/index.ts"),
|
||||
name: "DefgovUIWeb",
|
||||
formats: ["es", "cjs"],
|
||||
fileName: (format) => `index.${format}.js`,
|
||||
},
|
||||
|
||||
rollupOptions: {
|
||||
external: ["react", "react-dom", "react/jsx-runtime"],
|
||||
output: {
|
||||
globals: {
|
||||
react: "React",
|
||||
"react-dom": "ReactDOM",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
sourcemap: true,
|
||||
cssCodeSplit: true,
|
||||
|
||||
watch: {
|
||||
exclude: ["node_modules", "dist", ".git"],
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user