1
Fork 0
website-components/vite.config.js

19 lines
424 B
JavaScript
Raw Normal View History

2024-05-28 12:46:00 +01:00
import { resolve } from 'path'
import { defineConfig } from "vite";
import { globSync } from 'glob'
const SRC = resolve(__dirname, "src");
const ENTRYPOINTS = globSync("**/*.html", {cwd: SRC});
export default defineConfig({
root: SRC,
base: "./",
build: {
outDir: "../dist",
emptyOutDir: true,
rollupOptions: {
input: Object.fromEntries(ENTRYPOINTS.map(e => [e, resolve(SRC, e)])),
},
},
});