Skip to content

Commit

Permalink
Merge pull request #31 from patricklx/do-not-change-html-if-hmr-is-di…
Browse files Browse the repository at this point in the history
…sabled

do not change html if hmr is disabled
  • Loading branch information
patricklx authored Jul 10, 2024
2 parents a031114 + f9ba0ab commit c071bb0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export function hmr(enableViteHmrForModes: string[] = ['development']): Plugin {
}
},
transformIndexHtml(html) {
if (!process.env['EMBER_VITE_HMR_ENABLED']) {
return html;
}
return (
`<script type="module" src="/ember-vite-hmr/services/vite-hot-reload" />` +
html
Expand Down

0 comments on commit c071bb0

Please sign in to comment.