[🐞] Handle libraries that use $ in function names/only treat $ as a special character as suffix #7091
Labels
STATUS-2: team is working on this
Scheduled for work by the core team
TYPE: bug
Something isn't working
Which component is affected?
Qwik Optimizer (rust)
Describe the bug
I want to use the peggy library (https://peggyjs.org/). This library uses $ in function names, e. g.
peg$SyntaxError
. This causes errors in Qwik, e. g.Error: Value cannot be serialized in _.SyntaxError, because it's a function named "peg$SyntaxError". You might need to convert it to a QRL using $(fn): const peg$SyntaxError =...
The Qwik documentation states that it converts
$
suffixes. Here it is not a suffix, yet it causes this error. (I guess$
as suffix is only the suggested style.) Maybe this is a bug in the optimizer and it should only treat$
as a special symbol when it is a suffix of the function name?Reproduction
https://github.com/Talinx/qwik-issue-example
Steps to reproduce
Run
pnpm install
followed bypnpm dev
. Go to the site (http://localhost:5173/ by default. The error message will appear on the top of that site.System Info
The text was updated successfully, but these errors were encountered: