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

@preact/signals not supported out of the box #4856

Closed
1 task done
natemoo-re opened this issue Sep 23, 2022 · 2 comments · Fixed by #5015
Closed
1 task done

@preact/signals not supported out of the box #4856

natemoo-re opened this issue Sep 23, 2022 · 2 comments · Fixed by #5015
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)

Comments

@natemoo-re
Copy link
Member

What version of astro are you using?

16+

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

pnpm

What operating system are you using?

Mac

Describe the Bug

After installing @preact/signals, I needed to manually update my config to ensure @preact/signals is not externalized by Vite.

export default defineConfig({
  vite: {
    ssr: {
      noExternal: ['@preact/signals', 'preact', 'preact-render-to-string']
    }
  }
})

Repro works in StackBlitz but not locally

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-a863zh?file=src%2Fcomponents%2FCounter.tsx,astro.config.mjs

Participation

  • I am willing to submit a pull request for this issue.
@natemoo-re
Copy link
Member Author

You know what... I tried this yesterday and it didn't work. I tried it today and it worked. Maybe the new release of @preact/signals fixed this?

@matthewp
Copy link
Contributor

We're going to revert #4843 and update the preact/signals version there. It should be working once we do that.

@matthewp matthewp added the - P3: minor bug An edge case that only affects very specific usage (priority) label Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants