diff --git a/vite.config.js b/vite.config.js index 26a6c9e..7a6ef85 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,10 +1,20 @@ import { defineConfig } from 'vite'; import path from 'path'; +import { glob } from 'glob'; +import { fileURLToPath } from 'url'; export default defineConfig({ root: './', build: { outDir: 'dist', + rollupOptions: { + input: Object.fromEntries( + glob.sync('*.html').map(file => [ + path.basename(file, path.extname(file)), + fileURLToPath(new URL(file, import.meta.url)) + ]) + ) + } }, resolve: { alias: {