astro
astro copied to clipboard
🐛 BUG: Build includes a CSS file for each style tag (= a lot)
What version of astro
are you using?
1.0.0-beta.73
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Windows
Describe the Bug
I'm working on a project in which I mostly use Tailwind. Howver, in some cases I place styles in the style tag in acomponent, layout or page.
When running astro build, it generates a site with a lot of seperate CSS files which all get linked to in the head. This means that when I have 10 components with content in the style tag, my head will import 11(!) stylesheets (those 10 + the Tailwind styles). This doesn't seem good for seo..
I can't find anything on how astro us supposed to process styles. If this is intened, I'm would love to hear why. If not, I can provide more details and reproduction.
Link to Minimal Reproducible Example
Will add when I know if this is intended or not
Participation
- [ ] I am willing to submit a pull request for this issue.
Please provide an example. There are some scenarios where you can wind up with a lot of stylesheets, but only if you have many pages all sharing a lot of different sheets. It would be easier to explain if there were an example.
Going to close, please open a new issue if you have a reproduction.