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

(low priority) Extracted CSS are always named based on the first page they were fond, not the layout which include them #7696

Closed
1 task
mschoeffmann opened this issue Jul 18, 2023 · 1 comment
Labels
needs triage Issue needs to be triaged

Comments

@mschoeffmann
Copy link

What version of astro are you using?

2.8.3

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

pnpm

What operating system are you using?

Mac

What browser are you using?

Chrome (latest), Safari (latest)

Describe the Bug

When a CSS is imported inside a layout, and then used by multiple pages in multiple subdirectories, this CSS gets the filename of the very first rendered page where the CSS file was needed.

I think a more defined name like the name of the layout or something not so random would be more clear?

You see in attached StackBlitz after astro build:
The CSS is named test-a.hash.css (first page) instead of default.hash.css (layout).

Even if this is not a major thing, it makes it hard to find sources of issues on already deployed sites.

What's the expected result?

A more "undefined" name for the global CSS. Like "hoisted" for the scripts. Or the name of the including layout.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/astro-css-file-naming?file=README.md

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jul 18, 2023
@Princesseuh
Copy link
Member

Duplicate of #7469

@Princesseuh Princesseuh closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants