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

Exclude any ?raw or ?url css imports when adding asset links #3020

Merged
merged 3 commits into from
Apr 7, 2022

Conversation

tony-sull
Copy link
Contributor

@tony-sull tony-sull commented Apr 7, 2022

Changes

Updating astro build to match the behavior in astro dev - any CSS files imported as ?raw or ?url will be skipped when linking to final bundled assets

This matches Vite behavior where these imports aren't included in the internal asset graph(s) or in assetsInclude

Testing

Added a test to verify a page that uses both normal ESM imports, ?raw, and ?url imports

Docs

Related docs PR #326

@changeset-bot
Copy link

changeset-bot bot commented Apr 7, 2022

🦋 Changeset detected

Latest commit: 4eb9911

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

This PR includes changesets to release 1 package
Name Type
astro Patch

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 pkg: astro Related to the core `astro` package (scope) test labels Apr 7, 2022
@tony-sull tony-sull changed the title WIP: exclude any ?raw css imports when adding css asset links WIP: exclude any ?raw or ?url css imports when adding asset links Apr 7, 2022
@tony-sull tony-sull changed the title WIP: exclude any ?raw or ?url css imports when adding asset links Exclude any ?raw or ?url css imports when adding asset links Apr 7, 2022
@tony-sull tony-sull marked this pull request as ready for review April 7, 2022 17:43
Copy link
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@tony-sull tony-sull merged commit c773dcd into main Apr 7, 2022
This was referenced Apr 7, 2022
@tony-sull tony-sull deleted the fix/css-raw-imports branch April 20, 2022 12:25
SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
…ro#3020)

* exclude any ?raw css imports when adding css asset links

* ?url imports should be ignored as well

* chore: adding changeset
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.

2 participants