1
Fork 0
holllo-org/vite.config.ts

27 lines
551 B
TypeScript
Raw Normal View History

2022-03-27 21:21:21 +00:00
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,
sourcemap: true,
},
plugins: [
nunjucks({
nunjucksConfigure: {
throwOnUndefined: true,
},
}),
],
root: sourceDir,
});