Skip to content
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

Multiple exports issue #2347

Closed
PaulMaly opened this issue Apr 1, 2019 · 3 comments
Closed

Multiple exports issue #2347

PaulMaly opened this issue Apr 1, 2019 · 3 comments
Labels
Milestone

Comments

@PaulMaly
Copy link
Contributor

PaulMaly commented Apr 1, 2019

$$props is not defined

REPL

@Conduitry Conduitry added the bug label Apr 1, 2019
@Conduitry Conduitry added this to the 3.0 milestone Apr 1, 2019
@Conduitry
Copy link
Member

It looks like the export { name }; isn't marking the earlier let name = 'world'; as non-hoistable, which it should be. We're then left with let { name = 'world' } = $$props; outside of the instance function which accepts $$props as an argument.

@Conduitry
Copy link
Member

The current hoisting logic - last significantly changed in 8cae8f2 - contains a check for bailing on hoisting when if (v.export_name && v.export_name !== v.name) return false. I'm thinking we want to bail whenever we have export_name, not just when it's a renamed export. This doesn't break any other unit tests. Does this make sense to you @jches?

jches added a commit to jches/svelte that referenced this issue Apr 2, 2019
jches added a commit to jches/svelte that referenced this issue Apr 2, 2019
@jches
Copy link
Contributor

jches commented Apr 2, 2019

Yeah that sounds right to me - seems obvious in retrospect but it looks like this case didn't make it into the tests. I added a test and the fix here #2351

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants