Compilation error when building CRA project on Linux #745
Labels
bug report 🦗
Issue is probably a bug, but it needs to be checked
needs: complete repro 🖥️
Issue need to have complete repro provided
Environment
The error is also reproduced when configuring with craco-linaria. The error is also reproducible when configuring with craco-linaria and linaria 2.1.0
Description
I am styling custom React components with styled. Using object spread / rest syntax in props results in a compilation error.
The error message looks like this:
A similar error a similar error occurs when using array spread in a function argument
One of the most important details is that the bug is reproducible only on Linux. Build works without problems on Windows.
Reproducible Demo
The master branch demonstrates an error when using object spread / rest.
The error disappears if you make spread not in the props - argument, but in the body of the function.
The array-spread branch demonstrates an error when using array spread.
The error disappears if you make spread not in reduce callback - argument, but in the body of the function.
I would be grateful for information on any way to fix the error without giving up the spread / rest syntax.
The text was updated successfully, but these errors were encountered: