workers-sdk
workers-sdk copied to clipboard
🐛 BUG: Cloudflare Pages Plugin with static assets are not working
Which Cloudflare product(s) does this pertain to?
Pages
What version(s) of the tool(s) are you using?
wrangler 3.13.1
What version of Node are you using?
v19.5.0
What operating system are you using?
Mac
Describe the Bug
I'm developing my own Cloudflare plugin. This Plugin is comprised of some middleware functions + a static admin page.
For the moment I'm just trying to setup my development environment correctly. I've published the plugin under https://www.npmjs.com/package/@flarevault/admin-plugin
Imported on a simple NextJS page that gets hosted on Cloudflare pages and mounts the plugin under /flarevault
Problems:
1 - The automatic cloudflare pages deploy fails on asset verification 2 - Local wrangler deploy to cloudflare pages works but: Going to https://e6489099.flarevault-landing.pages.dev/flarevault shows 404
Going to https://e6489099.flarevault-landing.pages.dev/flarevault/index redirects to https://e6489099.flarevault-landing.pages.dev/cdn-cgi/pages-plugins/FAuerVvCdNqYM2m6HH-lT/flarevault/ which is also broken.
Going to that path directly also does not work.
I can verify that on my out directory, the folders are all properly created and files are properly setup there but it just doesn't work.
On the development side using wrangler pages dev and setting it to serve the out directory of the NextJS app the exact same behavior can be noticed.
This is blocking my ability to develop a Cloudflare pages plugin.
P.S. - I also find a bit weird that it becomes mandatory that while using Wrangler pages dev with a plugin that uses static assets the entire code that one is trying to work on has to be served from a static folder as well, instead of on proxy mode. As far as the developer is aware, he shouldn't be forced to move out of proxy just because a plugin uses static assets
Please provide a link to a minimal reproduction
https://e6489099.flarevault-landing.pages.dev/flarevault
Please provide any relevant error logs
No response
Thanks very much for the issue @andreencar! I'm just triaging this now and noticed that the link is broken. Do you have a minimal reproduction available?
hi @andreencar :) we haven't heard from you in a while, so we’re going to close this issue for now. if this is still a problem, please feel free to open a new issue referencing this one with an updated summary, repro, and any additional context and we will revisit and investigate further. thanks!