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

37 lines
946 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,
2022-09-28 11:55:51 +00:00
rollupOptions: {
input: {
2022-09-30 10:17:15 +00:00
fangs: path.join(sourceDir, 'fangs/index.html'),
2022-09-28 11:55:51 +00:00
home: path.join(sourceDir, 'index.html'),
queue: path.join(sourceDir, 'queue/index.html'),
2022-11-02 11:46:53 +00:00
're-nav': path.join(sourceDir, 're-nav/index.html'),
2022-11-22 13:17:30 +00:00
're-nav/share': path.join(sourceDir, 're-nav/share/index.html'),
2022-09-28 11:55:51 +00:00
},
},
2022-03-27 21:21:21 +00:00
sourcemap: true,
},
plugins: [
nunjucks({
nunjucksConfigure: {
throwOnUndefined: true,
},
}),
],
2022-09-28 11:55:51 +00:00
publicDir: path.join(sourceDir, 'static'),
2022-03-27 21:21:21 +00:00
root: sourceDir,
});