feat: Update Vite config to route URL paths based on HTML file names
This commit is contained in:
1 parent
491ecb76d5
commit
2348b25468
1 file changed
+10
@@ -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: {
|
||||
|
||||
Reference in new issue
Block a user