mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 00:32:35 +10:00
44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
/// <reference types='vitest' />
|
|
|
|
import { nxViteTsPaths } from "@nx/vite/plugins/nx-tsconfig-paths.plugin";
|
|
import react from "@vitejs/plugin-react-swc";
|
|
import { defineConfig, searchForWorkspaceRoot, splitVendorChunkPlugin } from "vite";
|
|
|
|
export default defineConfig({
|
|
cacheDir: "../../node_modules/.vite/client",
|
|
|
|
build: {
|
|
sourcemap: true,
|
|
},
|
|
|
|
define: {
|
|
appVersion: JSON.stringify(process.env.npm_package_version),
|
|
},
|
|
|
|
server: {
|
|
host: true,
|
|
port: +(process.env.__DEV__CLIENT_PORT ?? 5173),
|
|
fs: { allow: [searchForWorkspaceRoot(process.cwd())] },
|
|
},
|
|
|
|
preview: {
|
|
host: true,
|
|
port: +(process.env.__DEV__CLIENT_PORT ?? 5173),
|
|
},
|
|
|
|
plugins: [react(), nxViteTsPaths(), splitVendorChunkPlugin()],
|
|
|
|
test: {
|
|
globals: true,
|
|
environment: "jsdom",
|
|
cache: { dir: "../../node_modules/.vitest" },
|
|
include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
},
|
|
|
|
resolve: {
|
|
alias: {
|
|
"@/client/": `${searchForWorkspaceRoot(process.cwd())}/apps/client/src/`,
|
|
},
|
|
},
|
|
});
|