vercel / react-tweet

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

Remix, missing css modules #141

Open joshyboyrules opened 8 months ago

joshyboyrules commented 8 months ago

I'm trying to use this library in my react remix project, and having trouble importing the css.

I updated the remix config to include react-tweet

/** @type {import('@remix-run/dev').AppConfig} */
export default {
  ignoredRouteFiles: ["**/.*"],
  serverDependenciesToBundle: [
    /react-tweet/,
  ],
};

And Remix CSS bundling is enabled.. but the CSS seems to be missing from the <Tweet/> component.

<Tweet id="1448382615904346113" />

output:

image
acelaya commented 8 months ago

The same happens with Astro. It is possible to make it work in dev by setting vite.ssr.noExternal: 'react-tweet', but when you build the project, CSS is not bundled.

HananoshikaYomaru commented 3 months ago

@joshyboyrules have you solve this?