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
We are encountering issues while deploying two separate SvelteKit 5 projects to Cloudflare Pages. The build process fails with errors related to resolving component paths or modules. Here are the details of the issues:
[vite-plugin-pwa:build] Could not resolve "./icon" from "src/lib/components/index.ts"
The index.ts exports components from specific folders, such as export { Icon } from './icon';, but the PWA plugin cannot resolve the path despite no issues in local development.
Could not resolve "./Toast.svelte" from "src/lib/components/toast/index.ts"
Similar to the first project, the index.ts files structure components, and the issue arises when the PWA plugin fails to resolve paths during the Cloudflare build process.
Both projects work correctly in local environments, including full SSR builds, but they consistently fail on Cloudflare Pages. Key configurations such as vite.config.ts, TypeScript type definitions, and component structures have been verified, and Cloudflare-specific configurations (e.g., wrangler.toml) align with the projects’ requirements.
Questions for the Community:
Are there known limitations or nuances with the vite-plugin-pwa or Rollup on Cloudflare Pages that could be causing these resolution issues?
Could the problem be related to the wrangler.toml setup, Cloudflare's filesystem structure, or case sensitivity in component folder names?
Is there a recommended debugging approach to further isolate issues specific to Cloudflare’s environment?
Any insights or similar experiences would be greatly appreciated!
The text was updated successfully, but these errors were encountered:
can you try removing/disabling the pwa plugin in CF to test the build without the plugin? the buildEnd hook in the pwa build plugin just re-throw the error if present:
We are encountering issues while deploying two separate SvelteKit 5 projects to Cloudflare Pages. The build process fails with errors related to resolving component paths or modules. Here are the details of the issues:
Project 1: DApp SvelteKit Boilerplate
Error:
The
index.ts
exports components from specific folders, such asexport { Icon } from './icon';
, but the PWA plugin cannot resolve the path despite no issues in local development.Project 2: PayTo
Error:
Similar to the first project, the
index.ts
files structure components, and the issue arises when the PWA plugin fails to resolve paths during the Cloudflare build process.Both projects work correctly in local environments, including full SSR builds, but they consistently fail on Cloudflare Pages. Key configurations such as
vite.config.ts
, TypeScript type definitions, and component structures have been verified, and Cloudflare-specific configurations (e.g.,wrangler.toml
) align with the projects’ requirements.Questions for the Community:
vite-plugin-pwa
or Rollup on Cloudflare Pages that could be causing these resolution issues?wrangler.toml
setup, Cloudflare's filesystem structure, or case sensitivity in component folder names?Any insights or similar experiences would be greatly appreciated!
The text was updated successfully, but these errors were encountered: