-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
[STAGE-2] incomplete implementationRemove this label when implementation is completeRemove this label when implementation is complete[STAGE-2] not fully covered by tests yetRemove this label when tests are verified to cover the implementationRemove this label when tests are verified to cover the implementation[STAGE-2] unresolved discussions leftRemove this label when all critical discussions are resolved on the issueRemove this label when all critical discussions are resolved on the issue[STAGE-3] docs changes not added yetRemove this label when the necessary documentation for the feature / change is addedRemove this label when the necessary documentation for the feature / change is added[STAGE-3] missing 2 reviews for RFC PRsRemove this label when at least 2 core team members reviewed and approved the RFC implementationRemove this label when at least 2 core team members reviewed and approved the RFC implementation
Description
Which component is affected?
Qwik Rollup / Vite plugin
Describe the bug
The current Cloudflare pages setup makes it hard to develop qwik-city with Cloudflare page functions. Cloudflare has D1, KV etc objects that should be accessible during the development mode but at the moment we should first build. The build drops the static files to dist folder which can then be accessed using Cloudflare pages. Ideally, we should be able to have the HMR and wrangler reload during local development.
Can we provide guidance on how to develop locally with Cloudflare and qwik-city vite? (https://developers.cloudflare.com/pages/platform/functions/local-development/)
export const useListLoader = routeLoader$(async (context: any) => {
const ps = (context.env.get("cloudflaredb") as any)?.prepare(
"SELECT * FROM users"
);
if (ps) {
const users = await ps.first();
return {
users,
};
} else {
console.log("No access to D1", context.env.get("cloudflaredb"));
}
return {
users: [],
};
});
Reproduction
https://stackblitz.com/edit/qwik-starter-joopk8?file=src%2Froutes%2Findex.tsx
Steps to reproduce
No response
System Info
System:
OS: macOS 13.0
CPU: (8) arm64 Apple M1 Pro
Memory: 279.02 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.15.0 - ~/.volta/tools/image/node/18.15.0/bin/node
Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
npm: 9.5.0 - ~/.volta/tools/image/node/18.15.0/bin/npm
Browsers:
Chrome: 111.0.5563.64
Safari: 16.1
npmPackages:
@builder.io/qwik: 0.20.1 => 0.20.1
@builder.io/qwik-city: 0.5.2 => 0.5.2
undici: 5.20.0 => 5.20.0
vite: 4.1.4 => 4.1.4Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[STAGE-2] incomplete implementationRemove this label when implementation is completeRemove this label when implementation is complete[STAGE-2] not fully covered by tests yetRemove this label when tests are verified to cover the implementationRemove this label when tests are verified to cover the implementation[STAGE-2] unresolved discussions leftRemove this label when all critical discussions are resolved on the issueRemove this label when all critical discussions are resolved on the issue[STAGE-3] docs changes not added yetRemove this label when the necessary documentation for the feature / change is addedRemove this label when the necessary documentation for the feature / change is added[STAGE-3] missing 2 reviews for RFC PRsRemove this label when at least 2 core team members reviewed and approved the RFC implementationRemove this label when at least 2 core team members reviewed and approved the RFC implementation
Type
Projects
Status
In Progress (STAGE 2)