React, SASS, tsup and not loading component styles

Hi guys, anyone with experience using tsup and scss? I have a work React library codebase that use SASS for styling and tsup for bundling. But i noticed that importing a component don't load his styles, so i have to import a 'global.scss' file to make it work. I would like that when importing a component all its styles are imported automatically. I've been debbuging the output bundle and seems like tsup (esbuild) remove the css import from the file, so it make sense why is not working. Anyone know how to fix this issues? Btw, i'm also migrate them to SCSS modules.
0 Replies
No replies yetBe the first to reply to this messageJoin