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

Rendering components from /packages in SSR #597

Open
TheMcnafaha opened this issue Jan 12, 2024 · 0 comments
Open

Rendering components from /packages in SSR #597

TheMcnafaha opened this issue Jan 12, 2024 · 0 comments

Comments

@TheMcnafaha
Copy link
Contributor

From @maiieul (edited to remove discord especifics and use Github markdown):

Code like this currently doesn't work in SSR

import AccordionCode from '../../../../../../../../packages/kit-fluffy/src/components/accordion/accordion?raw'

?raw works out of the box in a simple Qwik/Vite project, and it does work in development with nx, but in preview/SSR it says that /accordion doesn't export default...

I tried with import.meta.glob but it's almost the same: dev works and SSR imports an empty string...

It should also be noted that if the file is copied to be in src, the problem goes away. The current plan to solve this would be to copy the directory packakes/[component name] inside each component that needs to access the code, most likely done with a custom script.

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

1 participant