Qwik setup failing next to react
Closed this issue · 2 comments
Britnell commented
hey,
this is qwik in astro alongside react too, and vercel. the most basic components are working any more,
so probably problem is with config / compiler setup
- repo is here : https://github.com/Britnell/astro-gym
- ts config is setup for react :
{
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react"
}
}
- in qwik file i use
/** @jsxImportSource @builder.io/qwik */
- astro config setup for both frameworks in separate subfolders ..
integrations: [
qwikdev({
include: ["src/qwik/*"],
}),
react({
include: ["src/react/*"],
}),
- error is on /qwik/counter.astro - the Qwik demo of a simple counter, useSignal +
$(()=>...)
- https://github.com/Britnell/astro-gym/blob/main/src/qwik/qwik.tsx
- the error on the page when
run dev
is about QRL[ERROR] Optimizer should replace all usages of $() with some special syntax. If you need to create a QRL manually, use inlinedQrl() instead.
- interestingly the error on
run build
isObjects are not valid as a React child (found: object with keys {type, props, immutableProps, children, flags, key}). If you meant to render a collection of children, use an array instead.
- I have upgraded qwik & astro/qwik packages but no difference ...
- any suggestions of what else to try would be very welcome
stackblitz here if that helps
https://stackblitz.com/~/github.com/Britnell/astro-gym
thejackshelton commented
Hey @Britnell! Looking over this real quick as I'm pushing stuff out the door with Qwik UI. It looks like you need to change the astro config to:
qwikdev({
include: ["**/qwik/*"],
}),
It does not seem to be finding the correct file path for vite to process the qwik files.
Britnell commented
ahh you're right, that works! it didn't recognise the path somehow,
would be nice to have more specific / relative paths.
thank you very much!