40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import { configDefaults, defineConfig } from "vitest/config";
|
|
import { docsDataPlugin } from "./apps/docs/.vitepress/docs-data";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import { fileURLToPath, URL } from "node:url";
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
docsDataPlugin(fileURLToPath(new URL("./apps/docs", import.meta.url))),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
vitepress: fileURLToPath(
|
|
new URL(
|
|
"./apps/docs/node_modules/vitepress/dist/client/index.js",
|
|
import.meta.url,
|
|
),
|
|
),
|
|
"@heroui-vue/components": fileURLToPath(
|
|
new URL("./packages/vue/src/index.ts", import.meta.url),
|
|
),
|
|
"@heroui-vue/styles": fileURLToPath(
|
|
new URL("./packages/styles/src/index.ts", import.meta.url),
|
|
),
|
|
},
|
|
},
|
|
test: {
|
|
environment: "jsdom",
|
|
include: ["tests/**/*.test.ts"],
|
|
// Client-only scope: legacy SSR/hydration files and mixed-file cases
|
|
// remain as historical material, outside default development/acceptance.
|
|
exclude: [
|
|
...configDefaults.exclude,
|
|
"**/*ssr.test.ts",
|
|
"**/*hydration.test.ts",
|
|
],
|
|
testNamePattern: /^(?!.*(?:\bssr\b|hydrat)).*$/i,
|
|
setupFiles: ["tests/setup/cssom.ts", "tests/setup/scroll.ts"],
|
|
},
|
|
});
|