#After editing dist/index.html, changes are not applied

1 messages · Page 1 of 1 (latest)

tranquil hedgeBOT
#

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

#

Astro's build process generates static files in the dist directory based on your source files. When you run npm run build, Astro takes your source files, processes them, and outputs the result into the dist directory.

If you make changes directly to the files in the dist directory, these changes will not persist when you run npm run build again, because Astro will overwrite the files in dist with a new build from your source files.

If you want to make changes that persist, you should make them in your source files, not in the dist directory. In your case, you should make changes to your .jsx files, and then run npm run build to see those changes reflected in dist/index.html.

As for server-side rendering the "Hello, {{ name }}", Astro does not use the {{ }} syntax for templating. If you want to use server-side rendering, you would need to use an SSR adapter. However, none of the extracts provided mention using an SSR adapter, so I can't provide specific instructions on how to do this.

For more information on Astro's build process, you can refer to the Astro documentation (https://docs.astro.build).

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

#

Let me check the knowledge base for you. One moment! :books: