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

unenv for SvelteKit #106

Open
1 task done
michael opened this issue Jun 2, 2023 · 2 comments
Open
1 task done

unenv for SvelteKit #106

michael opened this issue Jun 2, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@michael
Copy link

michael commented Jun 2, 2023

Describe the feature

Hey there!

I just learned I can magically deploy Nuxt applications, referencing some node stuff in the imports on CloudFlare Pages, when I tried the same with SvelteKit. 😅

This like gave me troubles:

import Database from 'better-sqlite3';

I know very little about state of the art build pipelines, but I wonder if there's an easy way to activate unenv nodeless for SvelteKit applications. By configuring Vite? Or does this work differently? Happy to work on and document something that provides that, given that it's feasible and you can give me some pointers how to start.

🙏
Michael

Additional information

  • Would you be willing to help implement this feature?
@pi0
Copy link
Member

pi0 commented Jun 2, 2023

Hi. In theory, it should be possible yes to integrate several unenv features.

You can check env from unenv is integrated into nitro rollup config. I suppose same can be integrated with it's Vite configuration.

On a related topic I have not much knowledge about internals of SvelteKit but an alternative approach could be (similar to Nuxt) to pass Svelte build output into a Nitro build pipeline as well to leverage all provider supports and zero code change.

@michael
Copy link
Author

michael commented Jun 2, 2023

Hi @pi0 thank you for the pointers. I think I will try to start a conversation about this within the Svelte community (they'll surely have thoughts about it) and come back here if more questions come up.

Thanks for this important work!

@Hebilicious Hebilicious added the enhancement New feature or request label Jul 1, 2023 — with Volta.net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants