You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional context
It may also be worth allowing __DEV__ to be imported from a module such as vite/env. This would also free TypeScript users from having to declare a global boolean in a declaration file.
The text was updated successfully, but these errors were encountered:
bates64
changed the title
Rename @hmr module for TypeScript compatibility
Rename @hmr module for TypeScript tooling compatibility
May 8, 2020
Is your feature request related to a problem? Please describe.
TypeScript editor tools complain that they
Cannot find module '@hmr'.
:Describe the solution you'd like
Move or alias
@hmr
tovite/hmr
. Then, typings can be provided from thevite
package itself.Describe alternatives you've considered
Users can declare the
@hmr
module themselves in a.d.ts
file:This requires duplicating type information already available in client.ts and breaks projects if the hmr API changes.
Additional context
It may also be worth allowing
__DEV__
to be imported from a module such asvite/env
. This would also free TypeScript users from having to declare a global boolean in a declaration file.The text was updated successfully, but these errors were encountered: