sylvain p 7fd8598b8c Remove all Replit references for portability
Strips the .replit/.replitignore files, replit.md (renamed to README.md),
the @replit/* vite plugins from cra-app and mockup-sandbox, the @replit
catalog/exclusion entries from pnpm-workspace.yaml, the linux-x64-only
platform overrides (Replit-specific optimization), and inline @replit
comment markers. Also regenerates pnpm-lock.yaml so the project can be
installed and built on any platform.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 12:23:45 +02:00

57 lines
1.2 KiB
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import path from "path";
import { mockupPreviewPlugin } from "./mockupPreviewPlugin";
const rawPort = process.env.PORT;
if (!rawPort) {
throw new Error(
"PORT environment variable is required but was not provided.",
);
}
const port = Number(rawPort);
if (Number.isNaN(port) || port <= 0) {
throw new Error(`Invalid PORT value: "${rawPort}"`);
}
const basePath = process.env.BASE_PATH;
if (!basePath) {
throw new Error(
"BASE_PATH environment variable is required but was not provided.",
);
}
export default defineConfig({
base: basePath,
plugins: [mockupPreviewPlugin(), react(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(import.meta.dirname, "src"),
},
},
root: path.resolve(import.meta.dirname),
build: {
outDir: path.resolve(import.meta.dirname, "dist"),
emptyOutDir: true,
},
server: {
port,
host: "0.0.0.0",
allowedHosts: true,
fs: {
strict: true,
deny: ["**/.*"],
},
},
preview: {
port,
host: "0.0.0.0",
allowedHosts: true,
},
});