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

module="context" block cannot have an export matching anything in the regular script block #217

Closed
arackaf opened this issue Nov 25, 2021 · 8 comments
Labels
bug Something isn't working triage Awaiting triage by a project member

Comments

@arackaf
Copy link

arackaf commented Nov 25, 2021

Describe the bug

Somewhat similar to #134

A Svelte module cannot have an export in a module script block with a name matching an export in the regular script block.

Except this breaks even with HMR turned off.

Reproduction

See svelte-loadable, in particular the two exported load functions.

https://github.com/kaisermann/svelte-loadable/blob/master/Loadable.svelte

Logs

n/a

System Info

n/a

Severity

blocking all usage of vite-plugin-svelte

@arackaf arackaf added bug Something isn't working triage Awaiting triage by a project member labels Nov 25, 2021
@dominikg
Copy link
Member

Hi,

please provide a repo with a reproduction, error logs and system information requested.

Thank you!

@dominikg
Copy link
Member

looks like this may be fixed in 2.7 by vitejs/vite#5464

@arackaf
Copy link
Author

arackaf commented Nov 25, 2021

@dominikg sorry about that. Is there some sort of online repl in which I can make a repro for a Vite build? It does definitely look like Vite 2.7 will fix this, but if not, I'd be happy to build a simple repro for you.

Also what "logs" are you looking for? Just the error message that gets thrown?

@dominikg
Copy link
Member

thrown errors, devserver or build log, versions used etc. online there are stackblitz shortcuts https://vite.new/svelte for a vanilla vite+svelte setup or https://node.new/sveltekit for kit.

@arackaf
Copy link
Author

arackaf commented Nov 25, 2021

@dominikg ok cool. Let's wait for Vite 2.7 to drop, and if this isn't fixed for free, I'll get you a proper repro :-)

Thanks for replying!!!

@bluwy
Copy link
Member

bluwy commented Dec 8, 2021

@arackaf Vite 2.7 has been released. Can you confirm this still happens?

@arackaf
Copy link
Author

arackaf commented Dec 9, 2021

@bluwy ya will do!

@arackaf
Copy link
Author

arackaf commented Dec 11, 2021

@bluwy I'll be honest, I can't even repro this with 2.6 anymore, but yeah, it works with 2.7 too.

Thanks!

@arackaf arackaf closed this as completed Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Awaiting triage by a project member
Projects
None yet
Development

No branches or pull requests

3 participants