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

Use new compiler resolvePath option #5133

Merged
merged 11 commits into from
Oct 21, 2022
Merged

Use new compiler resolvePath option #5133

merged 11 commits into from
Oct 21, 2022

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Oct 20, 2022

Changes

  • Remove some old code we had for resolving paths and metadata creation
  • Remove CSS module patch in vite-plugin-css to fix .css?raw usage
  • Remove export const $$metadata from Astro files (discussed with Nate that it's fine as it's internal API)
  • Remove createMetadata export from astro/runtime/server as the compiler doesn't use it anymore

Question:

  1. Is astro/runtime/server public API? Should I bring back a stub of createMetadata?

Note:

  1. One side-effect of the compiler import * removal is that esbuild would treeshake unused imports away, so I have to update some error tests to reference the variable to test correctly.

Testing

All existing tests should pass for this refactor.

I added a test for the .css?raw fix.

Docs

N/A. This change should be transparent.

@bluwy bluwy requested a review from a team as a code owner October 20, 2022 16:07
@changeset-bot
Copy link

changeset-bot bot commented Oct 20, 2022

🦋 Changeset detected

Latest commit: 98ac5f1

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 20, 2022
@matthewp
Copy link
Contributor

Is astro/runtime/server public API? Should I bring back a stub of createMetadata?

No, at least not that part. Some of the rendering stuff like renderComponent is a bit more murky.

@sarah11918 sarah11918 removed the request for review from a team October 20, 2022 21:56
@bluwy bluwy merged commit 1c477dd into main Oct 21, 2022
@bluwy bluwy deleted the resolve-path-option branch October 21, 2022 06:08
@astrobot-houston astrobot-houston mentioned this pull request Oct 21, 2022
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.

None yet

2 participants