Bundle CSS file without any processing #621
Replies: 4 comments 1 reply
-
You can import main.css in index.ts |
Beta Was this translation helpful? Give feedback.
-
I'm struggling with this too. It is also brought up here Even when i import my *.css in my index.ts, when the build happens the css is not applied to the built component. In my use case I have a monorepo with core, docs & ui trying to use the ui components across my mono repo has been a huge pain. edit: Here are the pain points from ESbuild |
Beta Was this translation helpful? Give feedback.
-
I'm getting the same issue, have you fond any fixes? |
Beta Was this translation helpful? Give feedback.
-
I am now simply copying files to the published bundle. See a full working example here: https://github.com/code-shaper/movie-magic/blob/main/packages/ui-lib/package.json#L15 In fact, I have baked this solution into my code-generation templates. See https://www.code-shaper.dev/ |
Beta Was this translation helpful? Give feedback.
-
tsup docs mention that it has "experimental CSS support". What does that mean?
Specifically, when I build my package, I want to add a simple global css file to the /dist folder. How can I do that? I tried adding the css file to the tsup command like this:
However this is giving lots of errors like this:
So what's the right way to add a css file to
/dist
using tsup?Beta Was this translation helpful? Give feedback.
All reactions