aleksandr
CDCloudflare Developers
•Created by aleksandr on 11/20/2024 in #pages-help
Removed an HTML page but it's still showing up on my website
Hi, my blog runs on Cloudflare Pages. Source code is here: https://github.com/AleksandrHovhannisyan/aleksandrhovhannisyan.com/. I'm using a static site generator called Eleventy but that's not relevant.
My most recent commit removed the following page from my source code: https://www.aleksandrhovhannisyan.com/blog/javascript-game-loop/. However, after pushing up that commit and redeploying, I'm still seeing the page.
- Build cache is disabled under
Settings > Build
.
- My build
command cleans the dist folder: https://github.com/AleksandrHovhannisyan/aleksandrhovhannisyan.com/blob/885d107789014d139c04e466fb827382c5a339c8/packages/web/package.json#L10
- I verified in Cloudflare's build logs that the page was not written to dist/
.
- I verified under build settings that dist/
is my output folder.
- Under Caching > Configuration
, I purged my website's cache.
- I enabled Development Mode from the dashboard to temporarily disable caching.
- I forced a redeploy.
- I opened the site incognito and also did a manual reload to rule out browser caching.
None of this worked. I'm seeing an HTTP response header of cf-cache-status: DYNAMIC
. Is that why I'm still seeing the page? If so, why did purging the cache not fix it? Is there a way to purge Cloudflare's CDN caching?7 replies
CDCloudflare Developers
•Created by aleksandr on 9/7/2024 in #pages-help
Documentation on using wrangler.toml to configure a Pages project (not workers/functions)
2 replies
CDCloudflare Developers
•Created by aleksandr on 9/1/2024 in #workers-help
Are Page Functions bundled differently than regular Workers?
Does anyone know if Page Functions are bundled differently than regular Workers that you deploy via
wrangler deploy
?
I have a Worker that lives in the same project directory as a Cloudflare Pages site.
My Worker fetches data from an external API: https://github.com/AleksandrHovhannisyan/aleksandrhovhannisyan.com/blob/977e2c600ec5c629db61f8ee2eaee60e1ef86923/functions/api/comments.ts
This works as expected when deployed as a regular worker via wrangler deploy
. All external modules are included/bundled in the final code and my client code is able to read the responses.
However, if I try to convert this worker to be a Page Function so that I don't have to manually re-deploy it every time, I get errors in my deploy logs saying certain external node modules (e.g., prismjs
) could not be resolved. These modules are being import
ed by the Page Function through other modules outside my functions/
directory. Basically, here is a simplified view of my project structure:
My functions/api/comments.ts
script imports shared modules from ../../config/*
, such as for Markdown processing (I reuse the same Markdown processor to parse comments as I do on my site).
This setup only works with a regular worker, not a Page Function.
I'm not sure if it makes any difference, but:
- I am using pnpm as my package manager (I don't think this is related).
- I am not using pnpm workspaces (maybe this is related?). I have just one package.json
at the root of the project.5 replies
CDCloudflare Developers
•Created by aleksandr on 8/31/2024 in #workers-help
Unable to test Cloudflare Page Function: [wrangler:err] Error: No response!
9 replies