27 lines
551 B
TypeScript
27 lines
551 B
TypeScript
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,
|
|
});
|