import path from 'node:path'; import url from 'node:url'; import {defineConfig} from 'vite'; import nunjucks from 'vite-plugin-nunjucks'; const currentDir = path.dirname(url.fileURLToPath(import.meta.url)); const buildDir = path.join(currentDir, 'build'); const sourceDir = path.join(currentDir, 'source'); export default defineConfig({ build: { minify: false, outDir: buildDir, rollupOptions: { input: { fangs: path.join(sourceDir, 'fangs/index.html'), home: path.join(sourceDir, 'index.html'), queue: path.join(sourceDir, 'queue/index.html'), }, }, sourcemap: true, }, plugins: [ nunjucks({ nunjucksConfigure: { throwOnUndefined: true, }, }), ], publicDir: path.join(sourceDir, 'static'), root: sourceDir, });