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

26 lines
561 B
JavaScript
Raw Permalink Normal View History

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