26 lines
637 B
TypeScript
26 lines
637 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { resolve } from "path";
|
|
|
|
export default defineConfig({
|
|
plugins: [react({ jsxRuntime: "automatic" })],
|
|
build: {
|
|
lib: {
|
|
entry: resolve(__dirname, "src/index.ts"),
|
|
name: "CryptoLocker",
|
|
fileName: "crypto-locker",
|
|
},
|
|
rollupOptions: {
|
|
external: ["react", "react-dom", "react/jsx-runtime", "crypto-js"],
|
|
output: {
|
|
globals: {
|
|
react: "React",
|
|
"react-dom": "ReactDOM",
|
|
"react/jsx-runtime": "jsxRuntime",
|
|
"crypto-js": "CryptoJS",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|