Open srpeirce opened 1 year ago
@srpeirce Thank you very much for your feedback! Yeah, I strongly agree with you.
Actually, I've mentioned the hot reloading in the FAQ section of the README as below:
Q1: Hot reloading and
dotnet watch
doesn't work. A1: Sorry for that. I want to manage to be available for hot reloading eventually.
It must be tough work, but I want to improve this part someday.
I think the problem is with the IFrame?
I took a bit more of a look last night and it seems to work if I load the IFrame URL directly in the browser.
I haven't looked further but hypothesis is that it's sime IFrame restrictions causing issues.
@srpeirce is correct, the BrowserRefresh Middleware in the dotnet SDK will only inject aspnetcore-browser-refresh.js when the "Sec-Fetch-Dest" header is set to "document", which excludes iframes.
I've created a merge request (https://github.com/jsakamoto/BlazingStory/pull/20) to manually inject the script to the PreviewFrame's iframe.
@coryjthompson Thank you for your pull request! I replied to you on theat pull request thread. https://github.com/jsakamoto/BlazingStory/pull/20#issuecomment-1890255139
Hello,
I am trying this out today - I thought it would be great to quickly design some components with hot reload.
Problem
Hot reload works, but doesn't automatically update components in the story. To see updated component I need to refresh page, or swap to another story.
Recreate
Then change the Button component somehow.
Would be possible to hot-reload inside each story (in the iframes)?
Thanks, Steve