cmsmanage/vite.config.js
Adam Goldsmith fb005d419f
Some checks failed
Ruff / ruff (push) Successful in 30s
Test / test (push) Failing after 2m29s
membershipworks: Fix missing bootstrap CSS in invoice PDFs
2024-07-24 21:53:44 -04:00

30 lines
667 B
JavaScript

import path from "node:path";
import { defineConfig } from "vite";
import { globbySync } from "globby";
const entry_points = globbySync("*/js/*.entry.ts", { gitignore: true });
const inputs = {
base: "./js/base.entry.ts",
"bootstrap-css-only": "./js/bootstrap-css-only.entry.ts",
};
for (const entry of entry_points) {
inputs[
path.dirname(path.dirname(entry)) + "/" + path.basename(entry, ".entry.ts")
] = entry;
}
export default defineConfig({
base: "/static/",
server: {
origin: "http://localhost:5173",
},
build: {
manifest: "manifest.json",
outDir: path.resolve("./vite-dist"),
rollupOptions: { input: inputs },
},
});