Closed ksjitendra18 closed 1 month ago
This is an ongoing issue with the Vite Plugin for Solid.
https://github.com/solidjs/vite-plugin-solid/issues/153
One workaround is to change your astro.config.ts
/astro.config.mjs
right before the build step.
import { defineConfig } from "astro/config";
import cloudflare from "@astrojs/cloudflare";
import solidJs from "@astrojs/solid-js";
// Example config
export default defineConfig({
integrations: [solidJs()],
output: "server",
adapter: cloudflare({
platformProxy: { enabled: true },
imageService: "passthrough",
}),
vite: {
// Temporary workaround
resolve: {
conditions: ["worker", "webworker"],
mainFields: ["module"],
},
},
});
Your experience may vary as this is not a perfect solution.
Thanks, we're trying to work with the Solid team to resolve this. Duplicate of #224
I had the same problem. In my case moving from <>...</>
to <div>...</div>
solved the issue. Maybe that can help you too @ksjitendra18
I had the same problem. In my case moving from
<>...</>
to<div>...</div>
solved the issue. Maybe that can help you too @ksjitendra18
This does fix the issue. Thank you.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Functionality like onClick is not working. In network tab all the files loaded just perfectly fine. I have tried this in Chrome, Firefox, Brave latest version.
I have tried v10.0.3, 10.1.0, 10.2.6 Version: "@astrojs/cloudflare": "^10.2.6", "@astrojs/solid-js": "^4.2.0", "@astrojs/tailwind": "^5.1.0", "astro": "^4.9.2", "solid-js": "^1.8.17",
Repo: https://github.com/ksjitendra18/astro-solid-repo Live: https://astro-solid-repo.pages.dev/
On downgrading the version to v8 or v9 the functionality works completely fine
What's the expected result?
onClick to work and log to console which doesn't work in latest version
On downgrading to v8 or v9 it works. Repo: https://github.com/ksjitendra18/astro-solid-repo/tree/dev Live URL: https://c46d4cfd.astro-solid-repo.pages.dev/
Link to Minimal Reproducible Example
https://github.com/ksjitendra18/astro-solid-repo
Participation