vercel / react-tweet

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

CSS not being shown in Next.js App Router #132

Open Illyism opened 10 months ago

Illyism commented 10 months ago

Hi, locally the react-tweet CSS is being shown but it's hidden in production.

Local

image

Prod

image

https://gradient.page/tools/stripe-fake-payment-notification-generator

Any ideas?

Illyism commented 10 months ago

In console, I get Uncaught SyntaxError: Unexpected token '.' (at a1b297e717863fd8.css:1:1)

And in the network tab I see that the css file is being loaded as a script instead of CSS.

image
Illyism commented 10 months ago

I ended up copying the CSS locally and importing it in layout.tsx, but the error still happens, you can see it on the site in console. Any ideas?

lfades commented 10 months ago

Can you provide a reproduction that I can take a look at 🙏 .

Looks like the tweet is showing in the provided URL, but if it's still not working a reproduction would be great