-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
35 lines (33 loc) · 913 Bytes
/
vite.config.ts
File metadata and controls
35 lines (33 loc) · 913 Bytes
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
import { URL, fileURLToPath } from "node:url";
import mdx from "@mdx-js/rollup";
import react from "@vitejs/plugin-react";
import vike from "vike/plugin";
import { defineConfig } from "vite";
import json5Plugin from "vite-plugin-json5";
const isStorybook = process.env.IS_STORYBOOK === "true";
export default defineConfig({
plugins: [
!isStorybook &&
vike({
prerender: true,
}),
react({}),
json5Plugin({}),
mdx({}),
],
server: {
allowedHosts: [".dowhile.uz"],
},
preview: {
allowedHosts: [".dowhile.uz"],
},
resolve: {
alias: {
"@app": fileURLToPath(new URL("./app", import.meta.url)),
"@widgets": fileURLToPath(new URL("./widgets", import.meta.url)),
"@features": fileURLToPath(new URL("./features", import.meta.url)),
"@entities": fileURLToPath(new URL("./entities", import.meta.url)),
"@shared": fileURLToPath(new URL("./shared", import.meta.url)),
},
},
});