mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-10 04:22:27 +10:00
63 lines
1.2 KiB
TypeScript
63 lines
1.2 KiB
TypeScript
/// <reference types='vitest' />
|
|
|
|
import { lingui } from "@lingui/vite-plugin";
|
|
import { nxViteTsPaths } from "@nx/vite/plugins/nx-tsconfig-paths.plugin";
|
|
import react from "@vitejs/plugin-react";
|
|
import { defineConfig, searchForWorkspaceRoot } from "vite";
|
|
|
|
export default defineConfig({
|
|
cacheDir: "../../node_modules/.vite/client",
|
|
|
|
build: {
|
|
sourcemap: true,
|
|
emptyOutDir: true,
|
|
},
|
|
|
|
define: {
|
|
appVersion: JSON.stringify(process.env.npm_package_version),
|
|
},
|
|
|
|
server: {
|
|
host: true,
|
|
port: 5173,
|
|
fs: { allow: [searchForWorkspaceRoot(process.cwd())] },
|
|
|
|
proxy: {
|
|
"/artboard": {
|
|
target: "http://localhost:6173",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
|
|
optimizeDeps: {
|
|
esbuildOptions: {
|
|
loader: {
|
|
".po": "text",
|
|
},
|
|
},
|
|
},
|
|
|
|
plugins: [
|
|
react({
|
|
babel: {
|
|
plugins: ["macros"],
|
|
},
|
|
}),
|
|
lingui(),
|
|
nxViteTsPaths(),
|
|
],
|
|
|
|
test: {
|
|
globals: true,
|
|
environment: "jsdom",
|
|
include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
},
|
|
|
|
resolve: {
|
|
alias: {
|
|
"@/client/": `${searchForWorkspaceRoot(process.cwd())}/apps/client/src/`,
|
|
},
|
|
},
|
|
});
|