Andrew Jeremy

Results 9 comments of Andrew Jeremy

What i did to solve it was to create a `` that references the CSS files directly in `index.html` , this helps with the initial HTML response from the server...

> @FreeJ1nG that works if you only have one static file, but in the case where the page you render has css imports throughout the tree, there needs to be...

> Very helpefull, thanks a lot! np 😉, seems like the author is no longer maintaining the repository

I tried changing [the vite source code for HMR types](https://github.com/FreeJ1nG/vite/blob/main/packages/vite/types/hot.d.ts) to not use imports at the top level, as suggested on TS' documentation. I'm out of ideas on how to...

> If you're adding custom events, have you tried this? https://vitejs.dev/guide/api-plugin.html#typescript-for-custom-events > > It would be in a separate `.d.ts` file for it to work, which is understandably a bit...

> It seems it needs to be (notice the extension): > > ```ts > import 'vite/types/customEvent.d.ts'; > > declare module 'vite/types/customEvent.d.ts' { > interface CustomEventMap { > 'custom:myCustomEvent': number; >...

> It would be great if you can do it 😀 Will do 🫡 I also think this part of the docs would be a better fit in the HMR...

Created a PR [here](https://github.com/vitejs/vite/pull/16609)

> I can confirm that I'm unable to reproduce this on stackblitz. Were you using "localhost" on your Windows machine? The only thing I can think of is that the...