penpot-mcp/penpot-plugin/vite.config.ts
Dominik Jain 02da2b4b19 Plugin: Add multi-user mode option (alt. run script, which sets constant)
User token is a dummy token for now; shall be provided by Penpot in the future
2025-12-16 22:28:02 +01:00

38 lines
951 B
TypeScript

import { defineConfig } from "vite";
import livePreview from "vite-live-preview";
// Debug: Log the environment variable
console.log("MULTI_USER_MODE env:", process.env.MULTI_USER_MODE);
console.log("Will define IS_MULTI_USER_MODE as:", JSON.stringify(process.env.MULTI_USER_MODE === "true"));
export default defineConfig({
plugins: [
livePreview({
reload: true,
config: {
build: {
sourcemap: true,
},
},
}),
],
build: {
rollupOptions: {
input: {
plugin: "src/plugin.ts",
index: "./index.html",
},
output: {
entryFileNames: "[name].js",
},
},
},
preview: {
port: 4400,
cors: true,
},
define: {
IS_MULTI_USER_MODE: JSON.stringify(process.env.MULTI_USER_MODE === "true"),
},
});