babel-plugin-polished
babel-plugin-polished copied to clipboard
Issues when integrating with istanbul
It's not my SO post, but this is essentially what I'm seeing: https://stackoverflow.com/questions/43940649/unexpected-node-type-error-sequenceexpression-with-jest
Essentially, istanbul and polished babel plugins don't play well with each other.
Here's out callstack:
SyntaxError: /next/app/components/FloatingActionButton/ui.tsx: Unexpected node type: SequenceExpression (This is an error on an internal node. Probably an internal error. Location has been estimated.)
28 | z-index: ${({ zIndex }) => zIndex || '2'};
29 | list-style-type: none;
> 30 | background-color: ${({ theme, active }) => (active ? rgba(theme.colors.white, 0.5) : theme.colors.transparent)};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31 | pointer-events: ${({ active }) => (active ? 'auto' : 'none')};
32 | -webkit-tap-highlight-color: ${({ theme }) => theme.colors.transparent};
33 |
at Array.filter (<anonymous>)
at Array.filter (<anonymous>)
Our workaround was to only use the plugin on env.prod in the .babelrc.