Skip to content

Commit

Permalink
fixup! Reapply "Turbopack: Register react refresh exports in module f…
Browse files Browse the repository at this point in the history
…actory (#8191)" (#8214)
  • Loading branch information
wbinnssmith committed May 28, 2024
1 parent d7741fb commit c7290a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/turbopack-ecmascript/src/transform/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ impl EcmascriptInputTransform {

if *refresh {
let stmt = quote!(
"\n__turbopack_refresh__.registerExports(module, \
// AMP / No-JS mode does not inject these helpers
"\nif (typeof globalThis.$RefreshHelpers$ === 'object' && \
globalThis.$RefreshHelpers !== null) { \
__turbopack_refresh__.registerExports(module, \
globalThis.$RefreshHelpers$); }\n" as Stmt
);

Expand Down

0 comments on commit c7290a1

Please sign in to comment.