including a jsx file #979
Replies: 1 comment
-
Nexrender assembles all scripts provided by the user and nexrender itself into a single jsx file executed before rendering starts. Furthermore, if you take a look at the generated file you'll see that all embedded files are scoped using (function() {})() bodies. That means that they run in an isolated manner. However, you are free to set-up additional means of communication by leveraging existing storage containers, for example One important thing to ensure, is that the file you are trying to include, should be executed and should export all of it's methods and data before the main script would be executed, otherwise there will be no registered exports. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I use custom JSX but I need to use
#include "second.jsx";
but Nexrender throws an error. I tried to include it with JSON.
"assets": [
{
"src": "main.jsx",
"type": "script"
},
{
"src": "second.jsx",
"type": "script"
}
]
Nexrender copies the JSX file to tmp folder but it doesn't work again.
Do you have any suggestions for including an external JSX file?
Beta Was this translation helpful? Give feedback.
All reactions