Conversation
Common image and font file types now have default loaders (dataurl for images, file for fonts) so bundled client scripts can import assets without requiring a custom esbuild.settings.js. Closes #230
Coverage Report for CI Build 24611338344Coverage increased (+0.03%) to 91.496%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
Adds default esbuild loader configuration so common asset types referenced from CSS/JS (images and fonts) build successfully without requiring a user-provided esbuild.settings.js.
Changes:
- Adds default
buildOpts.loadermappings for common image extensions using thedataurlloader. - Adds default
buildOpts.loadermappings for common font/icon extensions using thefileloader.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Acknowledged comment 3105651046. Declining to add an integration fixture in this PR. Adding test assets (binary image/font files) to the repo for a build-time integration test is a meaningful scope expansion. The change itself is a straightforward esbuild |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
References a .gif (dataurl loader) and .woff2 (file loader) from global.css. The test now asserts that the output CSS contains a base64-inlined data URL for the image, and that the woff2 font was emitted as a separate file. This catches regressions where esbuild would error on unrecognized file extensions in CSS. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds default
loaderentries to the esbuildbuildOptsso that common image and font file types work out of the box when imported in client-side bundles.Images (
.png,.jpg,.jpeg,.gif,.svg,.webp,.avif) use thedataurlloader and are inlined as base64 data URLs. Fonts (.ico,.woff,.woff2,.ttf,.eot,.otf) use thefileloader and are copied to the output directory.Users who need different behavior for a specific extension can override individual entries via
esbuild.settings.js.Closes #230