mirror of
https://github.com/rio-labs/rio.git
synced 2025-12-16 18:25:45 -06:00
27 lines
778 B
JavaScript
27 lines
778 B
JavaScript
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"],
|
|
}),
|
|
],
|
|
});
|