Bundle remote assets at build time

Hello, if i have my code on Github and image assets on a cdn, can i bundle those assets at build time, downloading them from the cdn to keep with my code files on Cloudflare Pages?
2 Replies
Hello, I’m Allie!
You should be able to, it would just depend on what you use to build your project
Ron Strauss
Ron Strauss7mo ago
You definitely can, but it's related to the build process (not a cloudflare action). Just be sure to change the asset's url that you're linking to. I'd suggest having some environment variable that prefixes all the assets URL. As for the assets, it's a simple for loop that curls all the assets and saves it in a designated assets folder. Or better yet, bundle it up and extract in folder.