2026-03-06 23:10:52 +03:00
|
|
|
import path from "node:path";
|
|
|
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
|
import { svelte } from "@sveltejs/vite-plugin-svelte";
|
|
|
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
|
|
2026-03-07 10:39:15 +03:00
|
|
|
const _dirname =
|
2026-03-06 23:10:52 +03:00
|
|
|
typeof __dirname !== "undefined"
|
|
|
|
|
? __dirname
|
|
|
|
|
: path.dirname(fileURLToPath(import.meta.url));
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [
|
|
|
|
|
svelte({
|
|
|
|
|
hot: !process.env.VITEST,
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
test: {
|
|
|
|
|
globals: true,
|
|
|
|
|
environment: "jsdom",
|
2026-03-07 10:55:57 +03:00
|
|
|
setupFiles: ["./src/shared/config/tests/setup.ts"],
|
|
|
|
|
include: ["src/**/*.test.{js,ts}"],
|
|
|
|
|
exclude: ["src/**/*.e2e.{js,ts}"],
|
2026-03-06 23:10:52 +03:00
|
|
|
},
|
|
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
2026-03-07 10:55:57 +03:00
|
|
|
$lib: path.resolve("./src/shared/lib"),
|
2026-03-06 23:10:52 +03:00
|
|
|
$shared: path.resolve("./src/shared"),
|
|
|
|
|
$pages: path.resolve("./src/pages"),
|
|
|
|
|
$features: path.resolve("./src/features"),
|
|
|
|
|
$entities: path.resolve("./src/entities"),
|
|
|
|
|
$widgets: path.resolve("./src/widgets"),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
});
|