Open stefandobre opened 2 years ago
Currently, whenever the compiler options get changed the typescript worker gets stopped which eventually leads to it being recreated with the new options. For a well configured web server, this will not pose a problem, as it is standard practice to cache script resources client side (via e.g. a long lived Expires
header). Even in the playground, I see that the new web worker uses the disk cache when being created:
We can leave this issue open as a feature request to update the TS compiler options without killing the entire TS worker, and with only recreating the language service on the worker side.
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Code
Have a look at the network tab and notice how after 3 seconds, workerMain.js and tsWorker.js are unnecessarily fetched again.
Observed in Monaco v0.32.1