-
-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Labels
Description
Reproduction link or steps
https://github.com/RobinVdBroeck/tsdown-unbundle-css-bug
What is expected?
When using unbundle: true with css.inject: true, we should get import "stylesheet.css" in dist aswel. However, this is not the case.
CSS modules do not seem to have this problem.
What is actually happening?
In the example, button gets renamed to button2.js in the dist folder, the css import is dropped.
Any additional comments?
css.splitting should default to true if unbundle: true, now defaults to false.
This use case for this is tree shaking, since we would like vite (or another build tool) to be able to drop the css for components that are not imported in the final product.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackPriority
None yet
Effort
None yet