38 lines
821 B
TypeScript
38 lines
821 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: {
|
|
index: resolve(__dirname, "src/index.ts"),
|
|
plugin: resolve(__dirname, "src/plugin.ts"),
|
|
},
|
|
name: "CryptoLocker",
|
|
},
|
|
rollupOptions: {
|
|
external: [
|
|
"react",
|
|
"react-dom",
|
|
"react/jsx-runtime",
|
|
"crypto-js",
|
|
"esbuild",
|
|
"fs/promises",
|
|
"path",
|
|
"url",
|
|
"mime-types"
|
|
],
|
|
output: {
|
|
globals: {
|
|
react: "React",
|
|
"react-dom": "ReactDOM",
|
|
"react/jsx-runtime": "jsxRuntime",
|
|
"crypto-js": "CryptoJS",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|