babel-plugin-polished icon indicating copy to clipboard operation
babel-plugin-polished copied to clipboard

Issues when integrating with istanbul

Open kylemh opened this issue 5 years ago • 0 comments

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.

kylemh avatar Oct 09 '20 16:10 kylemh