vercel / react-tweet

Embed tweets in your React application.
https://react-tweet.vercel.app
MIT License
1.49k stars 82 forks source link

Global CSS cannot be imported from within node_modules. #73

Closed GuruPrakashDavala closed 1 year ago

GuruPrakashDavala commented 1 year ago

I am using Next js version 13.

The EmbeddedTweet component from this package throws CSS Imported by a Dependency issue. https://nextjs.org/docs/messages/css-npm

I am fetching the tweet data from own API and passing it to the EmbeddedTweet component.

Attached are screenshots for your reference. Any suggestions will be greatly appreciated.

Package.json file:

Package json snapshot

Component file (short example):

React tweet component snapshot

tywayne commented 1 year ago

This comment on a previous issue reporting a similar error might be of assistance.

https://github.com/vercel-labs/react-tweet/issues/39#issuecomment-1472555146

GuruPrakashDavala commented 1 year ago

Thank you @tywayne

transpilePackages: ['react-tweet'] resolved the issue.