Skip to content

Lazy namespaced component undefined #5255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tanhauhau opened this issue Aug 10, 2020 · 1 comment · Fixed by #5256
Closed

Lazy namespaced component undefined #5255

tanhauhau opened this issue Aug 10, 2020 · 1 comment · Fixed by #5256

Comments

@tanhauhau
Copy link
Member

Describe the bug

I would expect this to work, but it did not.

<script>
	let component = import('./Lazy.svelte');
</script>

{#await component then Foo}
	<Foo.default />
{/await}

Logs
It gets compiled into new Foo.default({}) instead of new ctx[1].default({}).

To Reproduce
To help us help you, if you've found a bug please consider the following:

  • If you can demonstrate the bug using https://svelte.dev/repl, please do.
  • If that's not possible, we recommend creating a small repo that illustrates the problem.
  • Reproductions should be small, self-contained, correct examples – http://sscce.org.

Occasionally, this won't be possible, and that's fine – we still appreciate you raising the issue. But please understand that Svelte is run by unpaid volunteers in their free time, and issues that follow these instructions will get fixed faster.

Expected behavior
A clear and concise description of what you expected to happen.

Stacktraces
If you have a stack trace to include, we recommend putting inside a <details> block for the sake of the thread's readability:

Stack trace

Stack trace goes here...

Information about your Svelte project:

  • Your browser and the version: (e.x. Chrome 52.1, Firefox 48.0, IE 10)

  • Your operating system: (e.x. OS X 10, Ubuntu Linux 19.10, Windows XP, etc)

  • Svelte version (Please check you can reproduce the issue with the latest release!)

  • Whether your project uses Webpack or Rollup

Severity
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Svelte entirely?

Note: the more honest and specific you are here the more we will take you seriously.

Additional context
Add any other context about the problem here.

@Conduitry
Copy link
Member

This should now be working in 3.25.0.

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 a pull request may close this issue.

2 participants