react-docgen icon indicating copy to clipboard operation
react-docgen copied to clipboard

Warning: Cannot parse svg/brand.svg: SyntaxError: Unexpected token (1:1)

Open kopax opened this issue 7 years ago • 1 comments

I have a package that use react-styleguide and react-docgen, but without any react-component.

Instead, we use svgr and I try to import a svg as a react-component.

This work fine but it generate warning:

⠸ Compiling...Warning: Cannot parse svg/brand.svg: SyntaxError: Unexpected token (1:1)

It usually means that react-docgen does not understand your source code, try to file an issue here:
https://github.com/reactjs/react-docgen/issues

 DONE  Compiled successfully!

Is there a way to disable thoose ?

kopax avatar Mar 30 '18 08:03 kopax

Maybe this should be raised with react-styleguide. We could certainly add a silent mode, but it would still be on react-styleguide to enable that mode. Or they should not apply react-docgen to things that are not react components.

fkling avatar Jun 05 '18 21:06 fkling