26 lines
654 B
TypeScript
26 lines
654 B
TypeScript
|
import * as path from "path";
|
||
|
import { defineConfig } from "vite";
|
||
|
import react from "@vitejs/plugin-react";
|
||
|
|
||
|
// https://vitejs.dev/config/
|
||
|
export default defineConfig({
|
||
|
build: {
|
||
|
lib: {
|
||
|
entry: path.resolve(__dirname, "src/lib/index.tsx"),
|
||
|
name: "CUBETIQ MUUI",
|
||
|
fileName: (format) => `muui-vite.${format}.js`,
|
||
|
},
|
||
|
rollupOptions: {
|
||
|
// externalize deps that shouldn't be bundled
|
||
|
external: ["react", "react-dom"],
|
||
|
output: {
|
||
|
// Provide global variables to use in the UMD build for externalized deps
|
||
|
globals: {
|
||
|
react: "React",
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
plugins: [react()],
|
||
|
});
|