mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-09-07 13:05:46 +00:00
33 lines
938 B
TypeScript
33 lines
938 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { nxViteTsPaths } from "@nx/vite/plugins/nx-tsconfig-paths.plugin";
|
|
|
|
export default defineConfig({
|
|
root: __dirname,
|
|
// Env lives at the workspace root, shared with the backoffice — without this
|
|
// Vite looks in apps/portal and VITE_BASE_API_URL silently falls back to its
|
|
// built-in default.
|
|
envDir: "../../",
|
|
cacheDir: "../../node_modules/.vite/apps/portal",
|
|
server: {
|
|
port: 4200,
|
|
host: "localhost",
|
|
proxy: {
|
|
'/api': {
|
|
target: 'https://ema-api-dev.triaplc.com',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
preview: { port: 4200, host: "localhost" },
|
|
plugins: [react(), nxViteTsPaths()],
|
|
resolve: {
|
|
dedupe: ["react", "react-dom", "react-router-dom", "@tanstack/react-query"],
|
|
},
|
|
build: {
|
|
outDir: "../../dist/apps/portal",
|
|
emptyOutDir: true,
|
|
reportCompressedSize: true,
|
|
},
|
|
});
|