-
Notifications
You must be signed in to change notification settings - Fork 10
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 SSR Frameworks #7
Comments
Does the svelte-adapter work in Next.js? My next.js app can't recognize my svelte component. Cannot find module error. |
I’m not 100% on SSR, svelte has separate SSR builds so that will need to be handled somewhere. I’ll take a closer look at this shortly. |
Actually I realized adapter for Next.js for my work. If I'll have a time, I'll try to contribute. |
@Gennnji I'd love to take a look at your approach if possible. There are a few ways around this, that I can think of, but I have some reservations about which way makes the most sense. |
@pngwn Sorry for such late answer. Here is how I adapted your code for Next.js:
For using in Next.js I generate two bundles for Svelte App: client-side and SSR. Also I use CommonJS module so Next.js could run SSR without errors (maybe I just haven't configure webpack rightfully).
|
@pngwn Yeah, just found concrete version of Svelte where changes for |
It will be very useful to make Svelte-components for use in SSR Frameworks such as React-based Next.js and Vue-based Nuxt.js.
Maybe, after implementation an adapter for Angular, there will be a usefulness in adapter for Angular Universal.
The text was updated successfully, but these errors were encountered: