#Cloudflare issues

7 messages · Page 1 of 1 (latest)

spring kraken
#

I am trying to get Astro working on cloudflare. So far, very nice experience.

But now i encountered a problem while trying to integrate @vite-pwa/astro.

The build generates the necessary files (e.g. manifest.webmanifest, etc.) but in the last build step the files are getting removed.

`15:54:51 [build] output: "server"
15:54:51 [build] directory: D:\Development*\packages*\astro\dist
15:54:51 [build] adapter: @astrojs/cloudflare
15:54:51 [build] Collecting build info...
15:54:51 [build] ✓ Completed in 88ms.
15:54:51 [build] Building server entrypoints...
15:54:52 [build] ✓ Completed in 1.09s.
15:54:52
finalizing server assets

15:54:52 [build] Rearranging server assets...
15:54:55 [build] Waiting for integration "@vite-pwa/astro-integration", hook "astro:build:done"...
15:54:57 [build] Server built in 5.94s
15:54:57 [build] Complete!`

Whats left are 3 files. _routes.json, _worker.js and favicon.svg.

While checking the file _worker.js i see the reference to the manifest.webmanifest but none of the content.

So i get an 404 while trying to get the manifest.webmanifest file.

I tryed the node adapter and in this case, it worked.

How can i make this work?

fresh elbow
#

cc @fallow isle

fallow isle
#

Good question, we do remove the folder during the adapter step, however normally all files should be included in the dist folder. Maybe it get's removed because it is not used by any route.
Do you have a minimal reproduction to share?

spring kraken
#

yes, iam gonna upload it... gimme a minute

spring kraken
#

I kept on working on different things... e.g. adding tailwind, react etc. and now, it works!

fallow isle
#

Interesting. I didn't find any obvious reason looking at the repo.