vite-plugin-html-template icon indicating copy to clipboard operation
vite-plugin-html-template copied to clipboard

Usage with Vite version 5

Open hyunchulkwak opened this issue 2 months ago • 0 comments

I've been using vite-plugin-html-template to build multi page app with vite-plugin-mpa on Vite version 4. Recently updated to Vite version 5 and found that it needs to set appType: 'mpa' on vite config to load a bundle file for each page. Without the config pageName is not correctly found and falls back to index, which leads to every page loading a bundle file of index page.

Here req.url is .src/pages/test with Vite version 4. But with Vite version 5, it is /test without appType: 'mpa'.

https://github.com/IndexXuan/vite-plugin-html-template/blob/0a4b2d8528833ce282c6817cc65a4af79b773f83/src/index.ts#L56-L62

hyunchulkwak avatar Jun 12 '24 22:06 hyunchulkwak