Add default asset loaders to esbuild config#249
Conversation
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.
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.
|
Need to make sure we added the error that makes sense too. |
Configure default esbuild loaders for common image, icon, and font file types so CSS and client bundles can reference assets without custom settings. Add integration coverage for CSS asset imports, including inlined GIF data URLs and emitted WOFF2 font files. Document how to extend DOMStack's esbuild defaults and how to reset convenience defaults for full customization. Closes #230
09db533 to
4ad4272
Compare
Adds default
loaderentries to the esbuildbuildOptsso common image, icon, and font file types work out of the box when referenced from CSS or client-side bundles.Changes
.png,.jpg,.jpeg,.gif,.svg,.webp, and.avif..ico,.woff,.woff2,.ttf,.eot, and.otf.esbuild.settings.*customization patterns:Validation
npm run test:node-test -- test-cases/general-features/index.test.jsCloses #230