Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS ignored? #216

Open
marekdedic opened this issue Feb 29, 2024 · 1 comment
Open

CSS ignored? #216

marekdedic opened this issue Feb 29, 2024 · 1 comment

Comments

@marekdedic
Copy link
Contributor

Hi,
I set this up with my Vite library (so running Vite in library mode) with styles imported from the entry point. However, the size of the CSS file is reported as 0.

See the config here.

Happy to provide more info, but so far I don't think I am doing anything out of the ordinary for a Vite library mode project. Thanks!

@vio
Copy link
Member

vio commented Feb 29, 2024

Hi @marekdedic, thanks for opening the issue!

The plugin reads the data from the rollup bundle information. Rollup does not include a corresponding chunk for the css. As for the module size, by default, it is picked up from the rollup renderedLength (0 for your case), and when moduleOriginalSize is set, from originalLength.

      "../imagelightbox/src/lib/imagelightbox.css": {
        "code": "",
        "originalLength": 3810,
        "removedExports": [],
        "renderedExports": [],
        "renderedLength": 0
      },

I think it will be worth investigating how rollup is reporting the CSS and if there are any issues with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants