forked from rio-labs/rio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.mjs
More file actions
26 lines (24 loc) · 778 Bytes
/
vite.config.mjs
File metadata and controls
26 lines (24 loc) · 778 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
import { defineConfig } from "vite";
import { compression } from "vite-plugin-compression2";
import path from "path";
const PROJECT_ROOT = path.resolve(__dirname);
export default defineConfig({
root: path.join(PROJECT_ROOT, "frontend"),
// We don't know the server URL at build time, so this is intentionally an
// easy-to-replace placeholder
base: "/rio-base-url-placeholder/rio/frontend/",
build: {
outDir: path.join(PROJECT_ROOT, "rio", "frontend files"),
emptyOutDir: true,
rollupOptions: {
external: [/^\/rio\/assets\/.*/],
},
},
plugins: [
compression({
exclude: /.*index\.html$/,
deleteOriginalAssets: true,
algorithms: ["gzip"],
}),
],
});