21 lines
517 B
TypeScript
21 lines
517 B
TypeScript
import { resolve } from 'node:path';
|
|
import { readdirSync } from 'node:fs';
|
|
import { defineConfig } from 'vite';
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
target: 'esnext',
|
|
rollupOptions: {
|
|
input: readdirSync(__dirname)
|
|
.filter((file) => file.endsWith('.html'))
|
|
.reduce((acc, file) => {
|
|
acc[file.replace('.html', '')] = resolve(__dirname, file);
|
|
return acc;
|
|
}, {} as Record<string, string>),
|
|
},
|
|
modulePreload: {
|
|
polyfill: false,
|
|
},
|
|
},
|
|
});
|