Lots of HMR reloads for published dependency when using vite and TypeScript #10965
Unanswered
florianmartens
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I’m using Turborepo with a TypeScript Vite frontend app that depends on a (published) TypeScript library.
The setup works fine, but whenever I update the library, the browser performs a massive reload that sometimes freezes the browser.
In an ideal world would export the TypeScript
index.tsfile from the module. But since the utilities library is published to npm, I need the compilation to JavaScript. I'm unaware of any way to exportindex.tsduring development andindex.jsafter publishing (without a custom script).I feels like I'm fighting TurboRepo here and I'm guessing there's a better way that I can't find.
Can someone help?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions