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

Merged
merged 11 commits into from
Dec 4, 2024

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 19.02%

Comparing apatel369:arpan-#426-adp-customfilename (c5ac0ab) with main (350b3da)

Summary

⚡ 1 improvements
✅ 5 untouched benchmarks

Benchmarks breakdown

Benchmark main apatel369:arpan-#426-adp-customfilename Change
Rendering: streaming [true], .mdx file 920.9 ms 773.7 ms +19.02%

@apatel369 apatel369 force-pushed the arpan-#426-adp-customfilename branch from 0ad5f7b to d452c63 Compare November 28, 2024 19:07
@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
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @apatel369, sorry for the late review. The fix looks good, I would suggest a better description for merging the PR

.changeset/neat-papayas-brake.md Outdated Show resolved Hide resolved
improve changeset
@ematipico ematipico merged commit e6b8017 into withastro:main Dec 4, 2024
16 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Dec 4, 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.

2 participants