Closed askoufis closed 4 months ago
Latest commit: eea86d207e75895a09d9d763118f5e8141878fa0
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
When serving either the
basic
or thetypescript
fixture locally (viabuild:basic && serve:basic
orbuild:typescript && serve:typescript
), each iframe would re-load on every code change. This shouldn't happen when usingparamType: 'hash'
because hash replacements typically don't cause page navigation.It turns out that the culprit was the default behaviour of the
serve
CLI. By default,cleanUrls
istrue
. This results in all requests for.html
files being redirected to the same path but without.html
(see screenshot). This was occurring for iframe updates, which point directly to/frame.html
, resulting in a navigation and full re-load of the frame.The fix is to exclude
/frame.html
from this behaviour by configuring this inside aserve.json
file in each fixture directory.It turns out the
themed
fixture already had aserve.json
configuration, but it was just blanket-disabling this behaviour for all paths, which doesn't really achieve anything, but it means that you have to explicitly navigate to/index.html
to get thethemed
fixture to load locally, which is annoying.