Conversation
Add assets: ['resources/images/**'] to the laravel() plugin so static SVG icons referenced only via Vite::asset() in the imagewize/theme-icon binding get manifest entries. Without this, Vite::asset() throws and icons render as broken images in the editor and frontend.
Add guidance to CLAUDE.md and AGENTS.md that vite.config.js must keep the assets option for the theme-icon binding to work, and that SVGs should never be imported (Vite hashes them into stale URLs).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This release (version 2.15.3) resolves a critical defect in the
imagewize/theme-iconblock binding that caused SVG icons to render broken in both the editor and the frontend. The root cause was that icon assets inresources/images/were never included in the Vite build manifest, soVite::asset()could not resolve their hashed URLs at render time. The fix adds theassets: ['resources/images/**']option to thelaravel()plugin invite.config.js, which emits the icons into the manifest and restores URL resolution — the supported mechanism forlaravel-vite-pluginv3+ and Vite 8, replacing the olderimport.meta.globapproach. The change is accompanied by documentation updates and a version bump to keep developer guidance and release metadata in sync.Build and Asset Pipeline Fix:
assets: ['resources/images/**']option to thelaravel()Vite plugin invite.config.jsso SVG icons are emitted into the build manifest, allowingVite::asset('resources/images/icons/*.svg')to resolve at render time.imagewize/theme-iconPHP callback returnednull,window.imagewizeIconsvalues were empty, and every migrated icon block (icon-grid,feature-cards,trust-bar) rendered broken.Documentation and Developer Guidance:
CLAUDE.mdandAGENTS.mdto document the required Viteassetsoption as a critical step in the theme-icon binding pattern, preventing regressions in future icon work.docs/nynaeve/THEME-ICON-BINDING-BROKEN.mdfor the full failure analysis.Release Metadata:
style.css,readme.txt, andCHANGELOG.mdto reflect the fix.Files Changed:
AGENTS.md(Modified)CHANGELOG.md(Modified)CLAUDE.md(Modified)readme.txt(Modified)style.css(Modified)vite.config.js(Modified)