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

fix(cloudflare): solid ssr #264

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dirty-waves-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/cloudflare': patch
---

Fixes an issue with @astrojs/solid, where not all client directives where working
2 changes: 2 additions & 0 deletions packages/cloudflare/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ export default function createIntegration(args?: Options): AstroIntegration {
// We need those conditions, previous these conditions where applied at the esbuild step which we removed
// https://github.com/withastro/astro/pull/7092
vite.resolve.conditions.push('workerd', 'worker');
// https://github.com/solidjs/vite-plugin-solid/issues/153
vite.resolve.mainFields = ['module'];
Comment on lines +238 to +239
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should do this. It would break many other packages too that currently relies on the default mainFields configuration. I think solid should be fixing this itself: https://publint.dev/[email protected]


vite.ssr ||= {};
vite.ssr.target = 'webworker';
Expand Down
Loading