diff --git a/.changeset/dirty-waves-learn.md b/.changeset/dirty-waves-learn.md new file mode 100644 index 000000000..86ddbaed4 --- /dev/null +++ b/.changeset/dirty-waves-learn.md @@ -0,0 +1,5 @@ +--- +'@astrojs/cloudflare': patch +--- + +Fixes an issue with @astrojs/solid, where not all client directives where working diff --git a/packages/cloudflare/src/index.ts b/packages/cloudflare/src/index.ts index 3f55f693c..c3cae0002 100644 --- a/packages/cloudflare/src/index.ts +++ b/packages/cloudflare/src/index.ts @@ -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']; vite.ssr ||= {}; vite.ssr.target = 'webworker';