-
-
Notifications
You must be signed in to change notification settings - Fork 915
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
import 'solid-js/h': SyntaxError: The requested module 'solid-js/web' does not provide an export named 'SVGElements' #1187
Comments
How unusual. I can see it being exported from the build. |
I dont think solid-js/h has an ssr or nodjs implementation.
…On Sun, Aug 28, 2022, 1:30 AM Ryan Carniato ***@***.***> wrote:
How unusual. I can see it being exported from the build.
—
Reply to this email directly, view it on GitHub
<#1187 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAA4UDQVS7V47B5ZNSHCFLV3MBQRANCNFSM572D5DEQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
It does not as it doesn't support those. We'd need different runtime for the h function which doesn't exist yet. Are you trying to run it SSR? |
I'm working on xml exports with namespaces on the server. I found that jsx does not support namespaces but |
jsx should support namespaces normally |
That's a pleasant surprise. Thank you. A legit reason for supporting |
What our h element generates is a bunch of DOM-specific code the way Solid works. So it requires a whole other runtime for a server |
With deno & bun supporting .tsx in the runtime, I would hope that nodejs would also support .tsx soon. Since .tsx supports namespaces, it should be sufficient for rendering xml for batch processing. I can already shoehorn solid-start/vite + curl for batch processing as well. So in that case |
technically Node supports tsx and other extensions through the Loader API |
Are there any examples of using node & the loader API to render solid components? I suppose it would be as simple as using |
Their support is mostly useless for us as far as I'm concerned. Standard transform is unoptimal and as I was detailing we'd need a bunch of runtimes for it. Ergonomics are poorer. Size and performance worse. Using what we have means DOM emulation on the server which is why I'd be surprised if there were any examples of this. |
You can think of Node's Loader API as if Rollup was a runtime, which means you can intercept and transform requested modules before they are loaded by the importer module. The idea is fairly new but transforming TS files as well as compiling JSX should be possible with the Loader API |
After discussing with both of you here & on Discord, it's evident to me that using tsx/jsx for xml output opens up a can of worms for marginal benefit. I'm going to stick with xmlbuilder2, especially since it has |
I mean I can see it being a cool thing. But it probably would want its own JSX transform. Or like something like a custom renderer. Unless there is real benefit I'd go with tools that support this already because otherwise you are just building something new. Unless that's the intention. |
Describe the bug
When importing from 'solid-js/h'
The following error occurs:
Your Example Website or App
https://stackblitz.com/edit/typescript-73v5pv?file=index.ts
Steps to Reproduce the Bug or Issue
Expected behavior
The h function is returned.
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: