Visual Studio Script Documents Delay

Working on javascript projects in Visual Studio is frustrating due to all library scripts being opened in Script Documents. Whenever I make a change to a source file (JS,TS,HTML,CSS etc) all scripts must reload, which will freeze Visual Studio for some time.

This is more tolerable when using the inbuilt React template, as changes to TSX are hot-reloaded. I am currently trying out Lit + Shoelace with Vite, and the experience is almost unusable.

Anyway to get the hot-reload behaviour on non-React projects? Or anyway in general to mitigate delay?
Script Documents