You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tried to migrate to v2 manually and I have a common qwik file to store qwik related function, components and types.
When importing for example Slot from this common file, I've noticed a vite error.
See the repro in src > routes > layout.tsx where I explicitly do: import { Slot } from '~/common/qwik';
The reason the build failed was the re-exporting of the vite plugins in common/qwik.ts
Removing those as well as the node middleware makes the build work.
However, when re-exporting a xyz$ function, the corresponding xyzQrl function must also be exported. Furthermore, you can't re-export $, it's special and must be imported from the Qwik core library.
@steffanek We should document that, would you like to contribute with a docs PR?
I think the right place could be here in the build/v2/ branch. Thanks in advance 🚀
Which component is affected?
Qwik Runtime
Describe the bug
I've tried to migrate to v2 manually and I have a common qwik file to store qwik related function, components and types.
When importing for example Slot from this common file, I've noticed a vite error.
See the repro in
src > routes > layout.tsx
where I explicitly do:import { Slot } from '~/common/qwik';
Reproduction
https://stackblitz.com/edit/github-7ygh5v?file=src%2Froutes%2Findex.tsx,src%2Froutes%2Flayout.tsx,src%2Fcomponents%2Frouter-head%2Frouter-head.tsx,src%2Fcommon%2Fqwik.ts,src%2Fentry.ssr.tsx,src%2Fentry.preview.tsx,src%2Fentry.dev.tsx,tsconfig.json,vite.config.ts,src%2Froot.tsx
Steps to reproduce
No response
System Info
Additional Information
As discussed today @wmertens, my feeling was right about the common/qwik causing it.
The text was updated successfully, but these errors were encountered: