Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Disabling SSR when there is NodeJS.Supervisor running #144

Closed
samrat opened this issue Aug 7, 2024 · 2 comments
Closed

Disabling SSR when there is NodeJS.Supervisor running #144

samrat opened this issue Aug 7, 2024 · 2 comments

Comments

@samrat
Copy link

samrat commented Aug 7, 2024

Hello,

My application starts a NodeJS.Supervisor in order to use a Node dependency.

I want to disable SSR, but the running NodeJS.Supervisor it seems to lead LiveSvelte into making a NodeJS.call which results in this error:

[error] ** (NodeJS.Error) Cannot find module 'server'

For now, I only have one Svelte component, so I've just set <.svelte ... ssr={false} ...>, but what do you think of a application config to enable/disable SSR?

I'm happy to open a PR if this sounds like a good approach to solving this issue.

@woutdp
Copy link
Owner

woutdp commented Aug 8, 2024

Right, this is something I didn't really think of. SSR is automatically disabled when the NodeJS supervisor is not present. But in your case you need the NodeJS for something unrelated to LiveSvelte while wanting to disable LiveSvelte SSR. Let me know if I got that wrong.

I'd be happy to merge a PR that introduces an application config variable to enable/disable SSR.

@woutdp
Copy link
Owner

woutdp commented Sep 25, 2024

Needed this myself, will be added in version 0.14.0

https://github.com/woutdp/live_svelte?tab=readme-ov-file#globally

@woutdp woutdp closed this as completed Sep 25, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants