Skip to content

Commit

Permalink
chore: HMR for vaadin-react.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur- authored Sep 24, 2024
1 parent 622f05b commit d60a769
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,13 @@ import { routes } from "%routesJsImportPath%";

(window as any).Vaadin ??= {};
(window as any).Vaadin.routesConfig = routes;

export { routes as forHMROnly };

// @ts-ignore
if (import.meta.hot) {
// @ts-ignore
import.meta.hot.accept((module) => {
(window as any).Vaadin.routesConfig = module.forHMROnly;
});
}

0 comments on commit d60a769

Please sign in to comment.