import { defineConfig } from "vite"; export default defineConfig({ plugins: [], 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, }, }, }, });