Replies: 1 comment
-
Hi roycw, Webpack and similar bundlers do not support importing or compiling React components directly from string literals at runtime. If your backend returns components as strings including imports, you typically need to: Compile or transform these strings on the server side using tools like Babel or esbuild before sending to the client. Avoid runtime compilation in the browser since it is complex and unsafe. Use dynamic imports with pre-built components rather than compiling from strings on the fly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
is there any way wioht webpackmto import string literlas as full compoenents. i have abckend serevr that returns my React commp in a string including imports.... is there any way to pasre and compile on the spot....
Beta Was this translation helpful? Give feedback.
All reactions