react-docgen
react-docgen copied to clipboard
Support for CSS Modules
Hi guys!
React Scripts already support CSS Modules https://create-react-app.dev/docs/adding-a-css-modules-stylesheet
When I tried creating documentations via react-docgen. This error is displayed:
READING FILE: D:\workspaces-mobilize\steamfabuilib\src\components\CampaignMarketingForm\CampaignMarketingForm.js
D:\workspaces-mobilize\steamfabuilib\src\components\Styles\emoji-mart.module.css:1
(function (exports, require, module, __filename, __dirname) { .emoji-mart,
^
SyntaxError: Unexpected token .
It seems that css treated via CSS Modules is not supported by react-docgen. Can you have feedbacks from it? Thanks
This wouldn't be an issue with react-docgen, unless you are incorrectly trying to parse css files. React-docgen doesn't require any of your files so it would try and parse a dependency of a js file. The only way I think you can get this error is by trying to parse css files