UnexpectedKeyword [Error]: Unexpected keyword 'as' at position 8482
basmasking opened this issue · 1 comments
When building a full stack application using Vite, the front end is minimized using rollup. The minified files include the react library, and randomly named functions. The react items that are added contain the keyword as
in an error string.
Error("Objects are not valid as a React child (found: " ...
Or as the name of a function
function as(e,n,t){var r,l={},i=null,o=null;t!==void 0&&(i=""+t),n.key!==void 0&&(i=""+n.key),n.ref!==void 0&&(o=n.ref);
The parser seems to trip over these values, and throws an error. These generated files prevent jitar to start, and the influence we have on the generated values is minimal.
To get Jitar started, it helps to replace the as
values in the file to als
. Then Jitar will simply start and function normally.
The generated file is attached to this ticket below.
Just tested and discussed. The error is only thrown when as
is used as function name. The value in the string gets ignored by the parser.