-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathvite.config.site.mts
More file actions
31 lines (30 loc) · 868 Bytes
/
vite.config.site.mts
File metadata and controls
31 lines (30 loc) · 868 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
import path from "path";
import { glob } from "glob";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
root: path.join(__dirname, "website"),
resolve: {
alias: {
"@playhtml/common": path.join(__dirname, "packages/common/src"),
"@playhtml/react": path.join(__dirname, "packages/react/src"),
playhtml: path.join(__dirname, "packages/playhtml/src/index.ts"),
},
},
optimizeDeps: {
exclude: ["@playhtml/common", "@playhtml/react", "playhtml"],
},
build: {
rollupOptions: {
input: glob.sync(path.resolve(__dirname, "website", "**/*.html"), {
ignore: ["**/test/**"],
}),
},
outDir: path.join(__dirname, "site-dist"),
emptyOutDir: true,
},
plugins: [react()],
server: {
allowedHosts: ["16ea7fb66b66.ngrok-free.app"],
},
});