withastro / adapters

Home for Astro's core maintained adapters
47 stars 26 forks source link

SSR Output includes files which are only relevant for prerendering #220

Closed alexanderniebuhr closed 2 months ago

alexanderniebuhr commented 3 months ago

The SSR output of astro build, which is located in dist/_worker.js directory, contains files which are not used in SSR and only used for prerendering locally. We should not keep them and upload them to Cloudflare.

The goal is:

Potential important parts of the code:

https://github.com/withastro/adapters/blob/b153fc4565dd5b5902068e097a38a50f30a67bb8/packages/cloudflare/src/index.ts#L81-L88

https://github.com/withastro/adapters/blob/b153fc4565dd5b5902068e097a38a50f30a67bb8/packages/cloudflare/src/index.ts#L145-L213