#manifest.mjs file

6 messages · Page 1 of 1 (latest)

sour skyBOT
#

Hi @spare frost. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

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:

  1. 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.
  2. Astro then uses the client manifest to initiate a second build process which bundles optimized client-side JavaScript.
  3. Depending on your configured output, Astro will either execute the server-side JavaScript and write the output to .html files (for static output), or pass the server-side JavaScript to an adapter for further processing (for server output).

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

spare frost
#

@sour sky I don't use any SSR, my website is static, so how can I disable generating this file?

sour skyBOT
#

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.

If you have concerns about the presence of this file, it would be best to raise an issue or discussion on the Astro GitHub repository (https://github.com/withastro/astro/issues) to get more insights from the Astro development team.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: