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

Provide a good error message when loading react spectrum #3406

Merged
merged 2 commits into from
May 19, 2022

Conversation

matthewp
Copy link
Contributor

Changes

Testing

Test added

Docs

N/A, bug fix

@changeset-bot
Copy link

changeset-bot bot commented May 19, 2022

🦋 Changeset detected

Latest commit: 41276b8

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 May 19, 2022
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

lgtm!

@matthewp matthewp merged commit 4007aeb into main May 19, 2022
@matthewp matthewp deleted the err-react-spectrum branch May 19, 2022 17:12
@github-actions github-actions bot mentioned this pull request May 19, 2022
function generateHint(err: ErrorWithMetadata): string | undefined {
if (/Unknown file extension \"\.(jsx|vue|svelte|astro)\" for /.test(err.message)) {
return 'You likely need to add this package to `vite.ssr.noExternal` in your astro config file.';
} else {
Copy link
Member

Choose a reason for hiding this comment

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

Since we expect this function to grow over time, it would be good to get it into this structure for the future:

if (...) {
  return ...;
}

if (...) {
  return ...;
}

if (...) {

No need to fix now since this has already merged, but just a thought to remember next time we edit this file.

SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
)

* Provide a good error message when loading react spectrum

* Adds a 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.

🐛 BUG: Unable to load CSS from React-Spectrum
4 participants