-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
41 lines (39 loc) · 1.06 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
import { defineConfig } from "vite";
import path from "node:path";
import { fileURLToPath } from "url";
import { XaniaSsrPlugin } from "@xania/ssr";
import fs from "fs/promises";
const __dirname = fileURLToPath(new URL(".", import.meta.url));
export default defineConfig({
logLevel: "error",
resolve: {
alias: {
"~": path.resolve(__dirname),
"@xania/view": path.resolve(__dirname, "packages/view/lib/index.ts"),
"@xania/state": path.resolve(__dirname, "packages/state/lib/index.ts"),
"@xania/ssr": path.resolve(__dirname, "packages/ssr/index.ts")
}
},
server: {
port: 3000,
host: "0.0.0.0"
}
// define: {
// "import.meta.env.BASE_URL": '"/"'
// },
// plugins: [
// XaniaSsrPlugin({
// routes: {
// // "/pages/todomvc.tsx": () => import("./pages/todomvc")
// },
// async exists(file) {
// try {
// const stats = await fs.stat(file, {});
// return stats.isFile();
// } catch (err) {
// return false;
// }
// }
// })
// ]
});