Files
midgard6-vtt/vite.config.ts
T
Byroks 49b8eddf15
Foundry VTT System Release / build-and-release (push) Failing after 3m47s
Prepare for version 0.9 (#8)
Reviewed-on: #8
Co-authored-by: Byroks <byroks@gmail.com>
2026-10-26 18:48:35 +01:00

30 lines
638 B
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
plugins: [react()],
define: {
"process.env.NODE_ENV": JSON.stringify("production")
},
css: {
preprocessorOptions: {
scss: { api: "modern-compiler" }
}
},
build: {
outDir: "dist",
emptyOutDir: true,
lib: {
entry: "src/system.mjs",
formats: ["es"],
fileName: () => "system.mjs"
},
rollupOptions: {
output: {
// single-file bundle, no code-splitting: Foundry loads this one ESM file directly
inlineDynamicImports: true
}
}
}
});