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 Vite's resolve to resolve paths for client:only #5434

Merged
merged 7 commits into from
Nov 18, 2022
Merged

Conversation

matthewp
Copy link
Contributor

Changes

Testing

  • New test case added

Docs

N/A, bug fix

@changeset-bot
Copy link

changeset-bot bot commented Nov 17, 2022

🦋 Changeset detected

Latest commit: 3ea4582

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 Nov 17, 2022
@matthewp matthewp requested a review from bluwy November 17, 2022 21:47
@matthewp
Copy link
Contributor Author

@bluwy would love to get your opinion on this since you worked on this problem before. Any reason not to use Vite resolve here?

@bluwy
Copy link
Member

bluwy commented Nov 18, 2022

It doesn't use Vite resolve because it doesn't need to when compiling. We only need to make sure that path is import-able when the astro-island imports it.

I'm not sure if this PR is the right move here. I think we might need to fix how vite-plugin-css links the styles up, maybe the missing extension is causing incorrect checks.

@matthewp
Copy link
Contributor Author

@bluwy Yeah, you're right. I removed that and instead made it so that the analyzer always fully resolves via the specifier to keep track of these.

Copy link
Contributor

@tony-sull tony-sull left a comment

Choose a reason for hiding this comment

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

let Vite handle the resolve so we don't worry about extensions, makes sense!

@matthewp matthewp merged commit f5ed630 into main Nov 18, 2022
@matthewp matthewp deleted the client-only-tsx branch November 18, 2022 15:44
@astrobot-houston astrobot-houston mentioned this pull request Nov 18, 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.

imported css file classes don't get loaded on SSG build when using client:only=react
3 participants