-
Notifications
You must be signed in to change notification settings - Fork 183
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 SSR #48
Comments
Thanks for the the heads up @CaptainN , will take a look at the Svelte 3 options. I seem to remember a SSR option in Svelte or Rollup, will see if something can add there. I'm reluctant to include source in npm tarballs but can do so if is the recommended approach. Will look within next week. |
I've published a beta version of |
Published fix in v3.2 (https://github.com/bestguy/sveltestrap/releases/tag/v3.2.0), I'll leave this open until one of us can confirm works with your template. |
I tested out using your template and unfortunately this is same error:
It looks like Svelte has a I'll leave this issue open and will investigate. |
Oh - actually this does work, however you must import the source directly @abigtoe, import Card from 'sveltestrap/src/Card.svelte' There is a "svelte" key in package.json, so unsure why the svelte SSR or template is not supporting this syntax:
I'll investigate if there is anything I can do in this library, but if not will close this week. |
@bestguy Confirmed, the direct import approach does work. |
Thanks! I'll close this for now, I appreciate the heads up. |
This also works: |
Thanks @bestguy ! |
I have created a simple Svelte starter for Meteor, and it was reported that
sveltestrap
doesn't work with my SSR solution. I believe this is because your component is published in a pre-compiled state, instead of providing raw source and exposing that through asvelte
key inpackage.json
as is demonstrated in sveltejs/component-template.Svelte's SSR support works by using an entirely different compiler for server rendering, and would seem to require raw source in order to function properly.
The text was updated successfully, but these errors were encountered: