framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
18.06k stars 3.23k forks source link

asyncComponent fails on deep link (live example) #4097

Open fmp777 opened 1 year ago

fmp777 commented 1 year ago

Describe the bug

Using asyncComponent in the route definition results in svelte:component error on deep link.

To Reproduce

  1. Enable browserHistory in the main view
  2. Create a route using asyncComponent => import()
  3. Deep link into the route using asyncComponent
  4. Observe error

In the CodeSandbox

  1. In the app view window, click on ABOUT button.
  2. Note, the browserHistory is enabled.
  3. Now, refresh that view window to simulate a deep link.
  4. Observe the error.

Expected behavior

The page should simply load.

Actual Behavior

Getting a svelte:component JS error.

Screenshots

image

Additional context

Change the route definition to a component instead of asyncComponent and it works fine.