-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
41 lines (37 loc) · 1.09 KB
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/// <reference types="vitest" />
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
// This vite config is used for the storybook preview
export default defineConfig({
plugins: [react()],
optimizeDeps: {
exclude: [
"storybook",
"sb-vite",
"@ljcl/storybook-addon-cssprops",
"@storybook/blocks",
"@storybook/theming",
"@stoybook/components",
],
noDiscovery: false,
},
resolve: {
alias: {
"@components": path.resolve(
__dirname,
"packages/atomic-elements/src/components"
),
"@hooks": path.resolve(__dirname, "packages/atomic-elements/src/hooks"),
"@styles": path.resolve(__dirname, "packages/atomic-elements/src/styles"),
"@utils": path.resolve(__dirname, "packages/atomic-elements/src/utils"),
"@sb": path.resolve(__dirname, ".storybook/utils"),
},
},
// @ts-ignore - the reference is not working for some reason
// so the type is not being picked up
test: {
environment: "jsdom",
setupFiles: ["./vitest.setup.ts"],
},
});