#manifest.mjs file
6 messages · Page 1 of 1 (latest)
The manifest_*.mjs file you're seeing in your output directory is a part of Astro's build process. This file is a client manifest which is generated during the server-side JavaScript bundling process by Vite. The client manifest uses static analysis to collect all components needed for client-side interactivity.
Here's a simplified overview of Astro's build process:
- Astro begins with a server-side JavaScript bundle generated by Vite. The output of this bundle includes server-side JavaScript used to render HTML, a client manifest for client-side interactivity, and CSS and other assets for the client.
- Astro then uses the client manifest to initiate a second build process which bundles optimized client-side JavaScript.
- Depending on your configured
output, Astro will either execute the server-side JavaScript and write the output to.htmlfiles (forstaticoutput), or pass the server-side JavaScript to anadapterfor further processing (forserveroutput).
You can read more about Astro's build process in this blog post (https://astro.build/blog/hybrid-rendering#how-does-astros-build-process-work).
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@spare frost kapa.ai is still learning and improving, please let us know how it did by reacting below
@sour sky I don't use any SSR, my website is static, so how can I disable generating this file?
Let me check the knowledge base for you. One moment! :books:
Based on the information provided in the extracts, there isn't a direct way to disable the generation of the manifest_*.mjs file. This file is a part of Astro's build process and is generated even for static websites.
Astro uses Vite under the hood for its build process, and the manifest file is a result of Vite's static analysis during the server-side JavaScript bundling process. This process happens regardless of whether your website uses server-side rendering (SSR) or is purely static.