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

config: remove ~/assets alias #8113

Merged
merged 4 commits into from
Aug 17, 2023
Merged

config: remove ~/assets alias #8113

merged 4 commits into from
Aug 17, 2023

Conversation

Princesseuh
Copy link
Member

Changes

What the title says, the alias didn't work properly in the editor because of how TypeScript works and it was a bit awkward to have now that src/assets isn't necessarily as special as it used to be. We'll revisit this in the future in a dedicated "should we have cool aliases?" RFC potentially. But for 3.0, no built-in aliases. Of course people can still define them themselves if they desire to.

Testing

Kept the tests for aliases since it's good to test for people who configure them, but added the alias manually to those tests

Docs

Already covered by Sarah's current work on the v3 page for assets

@changeset-bot
Copy link

changeset-bot bot commented Aug 17, 2023

🦋 Changeset detected

Latest commit: c121733

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 pkg: integration Related to any renderer integration (scope) pkg: astro Related to the core `astro` package (scope) labels Aug 17, 2023
@Princesseuh
Copy link
Member Author

I just realized I did the exact same work as #7940 🤦‍♀️

@sarah11918
Copy link
Member

Just a note that if there is going to be a changeset here, since there is a potentially user breaking change and you might want something to show up in the changelog, you can pull from the content here: https://deploy-preview-3739--astro-docs-2.netlify.app/en/guides/images/#remove-the-assets-import-alias

But yes, advice for this will be covered in docs!

@sarah11918
Copy link
Member

Awww... and it was a first-time contributor! 😄

@Princesseuh
Copy link
Member Author

Awww... and it was a first-time contributor! 😄

We talk often on Discord about astro:assets, I'll credit them appropriately 😅

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
.changeset/clever-bats-breathe.md Outdated Show resolved Hide resolved
@Princesseuh Princesseuh merged commit 2484dc4 into next Aug 17, 2023
4 checks passed
@Princesseuh Princesseuh deleted the feat/remove-assets-alias branch August 17, 2023 12:22
@elliottmejia
Copy link

elliottmejia commented Nov 29, 2023

Hey, wrote a whole bunch of code with @components, @layout, etc. In a 2.x build.
From what I understand here, @ aliases are deprecated and I should instead be using ../ ?
Or should I set the baseURL to the relative path of the TS package? What would this be where the dist is on a base of ~?
I would much prefer to use aliases.

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) pkg: integration Related to any renderer integration (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants