Files
locker/example/vite.config.ts

19 lines
454 B
TypeScript

import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
import { cryptoLockerPlugin } from "vite-plugin-component-locker/plugin";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
return {
plugins: [
react({
exclude: /\.secret\.[jt]sx?$/,
}),
cryptoLockerPlugin({
password: env.LOCKER_PASSWORD || "secret123",
}),
],
};
});