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

Support for SvelteKit in REPL #844

Open
thecodejack opened this issue Jan 5, 2022 · 7 comments
Open

Support for SvelteKit in REPL #844

thecodejack opened this issue Jan 5, 2022 · 7 comments

Comments

@thecodejack
Copy link

Can we add support for some of sveltekit internal API especially $app (https://kit.svelte.dev/docs#modules-$app-env) ?

@Conduitry
Copy link
Member

Getting SvelteKit to work in the REPL is its own (quite large) project which we haven't begun to tackle yet, and in the meantime, I don't see much value in implementing various little pieces of it.

@thecodejack
Copy link
Author

I am not saying we need add support sveltekit as a whole. Would prefer to have some of sveltekit modules available. https://kit.svelte.dev/docs#modules

Slowly when third party libs starts supporting sveltekit, they may end up using some of sveltekit modules. So if those modules are available directly in REPL, can be help for the community.

@bluwy
Copy link
Member

bluwy commented Jan 5, 2022

SvelteKit's modules aren't independent in the sense that we can extract parts of it out. They are tightly integrated with the framework, so the most we can do is to shim it, which doesn't feel right. And implementing only parts of it would be confusing. Not to mention that the modules API can have breaking changes, which can break existing REPLs.

@thecodejack
Copy link
Author

agreed. So what should be right way to handle those? Should there be an exposed node module as a shim?

@bluwy
Copy link
Member

bluwy commented Jan 5, 2022

I think we should just not shim anything and keep the REPL vanilla. I'm not sure if it's worth the effort and instead could open a can of worms.

@thecodejack
Copy link
Author

yea..not saying to add in REPL. was just thinking out loud if we can have a shim node module which will expose $app as a module available for import. That node module can be imported in REPL code wherever required.

@benmccann
Copy link
Member

Related SvelteKit issue: sveltejs/kit#1485

@benmccann benmccann changed the title Getting $app module not found error for component which is using sveltkit in REPL Support for SvelteKit in REPL Nov 12, 2024
@benmccann benmccann transferred this issue from sveltejs/sites Nov 12, 2024
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

No branches or pull requests

4 participants