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

Shorter CSS naming algorithm #5036

Merged
merged 3 commits into from
Oct 10, 2022
Merged

Shorter CSS naming algorithm #5036

merged 3 commits into from
Oct 10, 2022

Conversation

matthewp
Copy link
Contributor

@matthewp matthewp commented Oct 10, 2022

Changes

  • This shortens the naming algorithm for CSS bundles. Previously we were concatenating each page in the bundle's from-src path which created some long names.
  • Now this takes just the last segment from the first page, for example src/pages/about.astro it takes just about and then also hashes all of the page ids, which gives us our unique hash.
  • With this change names will be shortened to something like: about.f6e31204.css in all cases.
  • Closes Weird generated asset name #4672

Testing

  • Tested with the examples to ensure short names
  • Tests should pass

Docs

N/A, bug fix

@changeset-bot
Copy link

changeset-bot bot commented Oct 10, 2022

🦋 Changeset detected

Latest commit: 8aa2695

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Oct 10, 2022
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weird generated asset name
2 participants