Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix custom assetFileNames issue #12449

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

apatel369
Copy link
Contributor

@apatel369 apatel369 commented Nov 15, 2024

Changes

closes #426 in adapters repo

When using custom assetFileNames in Astro configuration assets were incorrectly moved to the server directory instead of the client directory. This caused 404 errors when the browser tried to load these assets from the client side.

Users could specify custom directories for various asset types (e.g., CSS, images). To handle that used asset paths from the build output to ensure assets are moved from/to the correct directories.

Testing

Added tests for testing image and CSS assets with custom paths.
The previous test was passing cause accidentally build.assets and custom assetFileNames path were matching.
(assets and assets/css)
So updated that as well.

Docs

N/A bug fix

Copy link

changeset-bot bot commented Nov 15, 2024

⚠️ No Changeset found

Latest commit: b07ac29

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Nov 15, 2024
Copy link

codspeed-hq bot commented Nov 22, 2024

CodSpeed Performance Report

Merging #12449 will improve performances by 42.54%

Comparing apatel369:arpan-#426-adp-customfilename (63ab7d9) with main (92c269b)

Summary

⚡ 1 improvements
✅ 5 untouched benchmarks

Benchmarks breakdown

Benchmark main apatel369:arpan-#426-adp-customfilename Change
Rendering: streaming [false], .mdx file 1,046.6 ms 734.2 ms +42.54%

@apatel369 apatel369 marked this pull request as ready for review November 29, 2024 07:11
@apatel369 apatel369 changed the title fix custom assetFileNames issue fix custom assetFileNames issue Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant