Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on ImportMeta types #10

Closed
bramaudi opened this issue Apr 15, 2021 · 1 comment
Closed

Error on ImportMeta types #10

bramaudi opened this issue Apr 15, 2021 · 1 comment

Comments

@bramaudi
Copy link

I follow the code below to opt out HMR

if (import.meta.hot) {
  import.meta.accept();
  import.meta.dispose(dispose);
}

But it got error on type-checking:

Property 'accept' does not exist on type 'ImportMeta'.

Did you mean import.meta.hot.accept() & import.meta.hot.dispose(dispose)?

@amoutonbrady
Copy link
Member

Hey! Yes this is definitely a typo. I'll update the Readme with the proper syntax. Thanks (and sorry for the delayed answer).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants