mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 08:57:54 +00:00
43 lines
1.0 KiB
TypeScript
43 lines
1.0 KiB
TypeScript
/// <reference types='vitest' />
|
|
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import { nxViteTsPaths } from "@nx/vite/plugins/nx-tsconfig-paths.plugin";
|
|
|
|
export default defineConfig(() => ({
|
|
root: __dirname,
|
|
cacheDir: "../../node_modules/.vite/apps/genhub",
|
|
server: {
|
|
port: 4300,
|
|
host: "localhost",
|
|
},
|
|
preview: {
|
|
port: 4300,
|
|
host: "localhost",
|
|
},
|
|
plugins: [react(), tailwindcss(), nxViteTsPaths()],
|
|
// Uncomment this if you are using workers.
|
|
// worker: {
|
|
// plugins: [ nxViteTsPaths() ],
|
|
// },
|
|
build: {
|
|
outDir: "./dist",
|
|
emptyOutDir: true,
|
|
reportCompressedSize: true,
|
|
commonjsOptions: {
|
|
transformMixedEsModules: true,
|
|
},
|
|
},
|
|
test: {
|
|
watch: false,
|
|
globals: true,
|
|
environment: "jsdom",
|
|
include: ["{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
reporters: ["default"],
|
|
coverage: {
|
|
reportsDirectory: "./test-output/vitest/coverage",
|
|
provider: "v8" as const,
|
|
},
|
|
},
|
|
}));
|