Skip to content

fix(start): fix hmr by stubbing react refresh runtime#2286

Closed
lithdew wants to merge 1 commit intoTanStack:mainfrom
lithdew:main
Closed

fix(start): fix hmr by stubbing react refresh runtime#2286
lithdew wants to merge 1 commit intoTanStack:mainfrom
lithdew:main

Conversation

@lithdew
Copy link
Contributor

@lithdew lithdew commented Sep 7, 2024

Unsure if this is a foolproof solution since it stubs variables/functions i.e. $Refresh{Reg,Sig}$ and __vite_plugin_react_preamble_installed, though this has been a fix for my HMR issues with TanStack Start on a project I have in production.

@nx-cloud
Copy link

nx-cloud bot commented Sep 7, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 420c132. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 7, 2024

Open in Stackblitz

More templates

@tanstack/history

pnpm add https://pkg.pr.new/@tanstack/history@2286

@tanstack/react-router

pnpm add https://pkg.pr.new/@tanstack/react-router@2286

@tanstack/react-cross-context

pnpm add https://pkg.pr.new/@tanstack/react-cross-context@2286

@tanstack/react-router-with-query

pnpm add https://pkg.pr.new/@tanstack/react-router-with-query@2286

@tanstack/router-arktype-adapter

pnpm add https://pkg.pr.new/@tanstack/router-arktype-adapter@2286

@tanstack/router-cli

pnpm add https://pkg.pr.new/@tanstack/router-cli@2286

@tanstack/router-devtools

pnpm add https://pkg.pr.new/@tanstack/router-devtools@2286

@tanstack/router-generator

pnpm add https://pkg.pr.new/@tanstack/router-generator@2286

@tanstack/router-plugin

pnpm add https://pkg.pr.new/@tanstack/router-plugin@2286

@tanstack/router-valibot-adapter

pnpm add https://pkg.pr.new/@tanstack/router-valibot-adapter@2286

@tanstack/router-vite-plugin

pnpm add https://pkg.pr.new/@tanstack/router-vite-plugin@2286

@tanstack/router-zod-adapter

pnpm add https://pkg.pr.new/@tanstack/router-zod-adapter@2286

@tanstack/start

pnpm add https://pkg.pr.new/@tanstack/start@2286

@tanstack/start-vite-plugin

pnpm add https://pkg.pr.new/@tanstack/start-vite-plugin@2286

@tanstack/virtual-file-routes

pnpm add https://pkg.pr.new/@tanstack/virtual-file-routes@2286

commit: 420c132

SeanCassiere added a commit that referenced this pull request Sep 11, 2024
Forces the root to be HMR ready

Co-Authored-By: Kenta Iwasaki <63115601+lithdew@users.noreply.github.com>
schiller-manuel pushed a commit that referenced this pull request Sep 12, 2024
Forces the root to be HMR ready

Co-Authored-By: Kenta Iwasaki <63115601+lithdew@users.noreply.github.com>
@SeanCassiere
Copy link
Member

Closing, as the changes in this PR have added into main in #3313.

Thank you @lithdew!

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

Successfully merging this pull request may close these issues.

2 participants