You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This throws: "Could not parse member expression" error during build
It looks like yak-swc tries to statically analyze the code to find constant value and can't handle calls like .toFixed() although these functions run at runtime.
The core of the issue seems to be in how member expressions are analyzed. The current logic tries to convert every member expression into a string path, but it doesn’t distinguish between safe, static accesses (like colors.primary) and method calls (like value.toFixed(2)), which shouldn’t be resolved at build time
The text was updated successfully, but these errors were encountered:
I ran into a bug when trying to use arrow functions with method calls inside a
css
template literal.For example:
This throws:
"Could not parse member expression"
error during buildIt looks like yak-swc tries to statically analyze the code to find constant value and can't handle calls like
.toFixed()
although these functions run at runtime.The core of the issue seems to be in how member expressions are analyzed. The current logic tries to convert every member expression into a string path, but it doesn’t distinguish between safe, static accesses (like
colors.primary
) and method calls (likevalue.toFixed(2)
), which shouldn’t be resolved at build timeThe text was updated successfully, but these errors were encountered: