docs icon indicating copy to clipboard operation
docs copied to clipboard

feat(recipe): add customization of build file names recipe

Open casungo opened this issue 6 months ago • 2 comments

Description (required)

This pull request introduces a new recipe page to the Astro documentation titled "Customizing Output File Names."

This recipe addresses the need for users to have more control over the naming and directory structure of their built assets (JavaScript, CSS, images, fonts, etc.). It explains how to leverage Vite's Rollup output options within the astro.config.mjs file to customize entryFileNames, chunkFileNames, and assetFileNames.

This content was previously part of the v4 documentation but was removed from the main configuration page as it's considered a more advanced use case. Creating it as a recipe makes this valuable information accessible to users who specifically need this customization, as suggested in issue #10348.

Related issues & labels (optional)

  • Closes #10348
  • Suggested label: recipe, add new content

casungo avatar May 14 '25 21:05 casungo

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
Latest commit 1b0328321e6ec9802e70a09a5898202901c81bbc
Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/688765d5465fba0008ef1832
Deploy Preview https://deploy-preview-11678--astro-docs-2.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar May 14 '25 21:05 netlify[bot]

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/recipes/customizing-output-filenames.mdx Localization added, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

astrobot-houston avatar May 14 '25 21:05 astrobot-houston

Just apologizing that I haven't had a chance to really get in and review this one carefully, but I'm hoping to get around to it soon!

sarah11918 avatar Jul 07 '25 13:07 sarah11918

Hey @casungo ! I took an editing pass on this to conform to some of the other recipe patterns and incorporate Hideoo's feedback. See what you think! (And of course, there may be typos etc.)

sarah11918 avatar Jul 25 '25 14:07 sarah11918

Other than not knowing exactly what to choose for a title, I think this one is ready for a @yanthomasdev final boss review!

sarah11918 avatar Jul 25 '25 21:07 sarah11918