Creating custom react components fails with jsxRuntime not defined
I want to create a graph network visualisation app component and was looking at either https://reagraph.dev/ or https://www.xyflow.com/ but both add jsxRuntime as dependency and can't be ran. Is there a way to circumvent that?
Node Based UIs for React and Svelte – xyflow
Powerful open source libraries for building node-based UIs with React or Svelte. Ready out-of-the-box and infinitely customizable.
14 Replies
you need to bundle it within
but you already alias react with https://unpkg.com/react@18.2.0/umd/react.development.js in the example component how can I bundle only jsxRuntime?
I think i'm lacking context, I have no idea what adding jsxRuntime entails
I mean here react and
react-dom
are alias which marks them as external which makes react/jsx-runtime
external as wellso it works in dev but not when imported in windmill ?
yes
Would you have the error you see in windmill and could you share a repo that does a minimal reproduction of the issue please
At first I get React$1 is undefined then when I add
I get jsxRuntime is not defined
Here is an example repo with the canges I made:
https://github.com/alex4o/windmill-component-example-error/commit/4bf6ee3aff6b1c282280da3155d1bc377e504d75
thanks, adding to backlog to investigate this
thank you, I tried a few other things but couldn't get it to work
@alex4o this is the only fix that is needed
Thank you, I will try it in a bit