25 lines
530 B
TypeScript
25 lines
530 B
TypeScript
import { defineConfig } from "vite";
|
|||
|
|
import react from "@vitejs/plugin-react";
|
||
|
|
import dts from "vite-plugin-dts";
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [react(), dts()],
|
||
|
|
build: {
|
||
|
|
lib: {
|
||
|
|
entry: "src/index.ts",
|
||
|
|
name: "AccessibilityWidget",
|
||
|
|
fileName: "accessibility-widget",
|
||
|
|
formats: ["es", "umd"],
|
||
|
|
},
|
||
|
|
rollupOptions: {
|
||
|
|
external: ["react", "react-dom"],
|
||
|
|
output: {
|
||
|
|
globals: {
|
||
|
|
react: "React",
|
||
|
|
"react-dom": "ReactDOM",
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
});
|