36 lines
873 B
TypeScript
36 lines
873 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,
|
|
rollupOptions: {
|
|
input: {
|
|
fangs: path.join(sourceDir, 'fangs/index.html'),
|
|
home: path.join(sourceDir, 'index.html'),
|
|
queue: path.join(sourceDir, 'queue/index.html'),
|
|
're-nav': path.join(sourceDir, 're-nav/index.html'),
|
|
},
|
|
},
|
|
sourcemap: true,
|
|
},
|
|
plugins: [
|
|
nunjucks({
|
|
nunjucksConfigure: {
|
|
throwOnUndefined: true,
|
|
},
|
|
}),
|
|
],
|
|
publicDir: path.join(sourceDir, 'static'),
|
|
root: sourceDir,
|
|
});
|