#vite build can add a period `./` to the relative url of script
1 messages · Page 1 of 1 (latest)
1 messages · Page 1 of 1 (latest)
Context, I'm doing a game framework (https://kaplayjs) and our vite template has troubles for ppl who want to publish on Itch.io. We found the way to fix it is inserting ./ in index.html <script src> element, so instead of be /assets/blah.js it is ./assets/blah.js.
There's a way we can do it automatically, maybe a vite option?
You can use the transformIndexHtml plugin hook and do a find and replace perhaps?