tito10047/asset-mapper-test-bundle
A Symfony test bundle for AssetMapper that provides helpers and assertions for verifying asset mapping behavior in your test suite. Use it to check that mapped assets resolve, render, and compile correctly, making it easier to write reliable integration tests for asset handling without manual setup.
assets/vendor layout into node_modules-style resolution so a Node test runner (Vitest/Jest) can resolve bare specifiers like @hotwired/stimulus or jquery-ui/ui/widgets/sortable. That makes "keep importmap as the single source of dependency truth, test with Node anyway" a viable roadmap option rather than a tradeoff.index.js and package.json through a directory symlink into assets/vendor/, permanently contaminating project source assets. If this is already in a codebase, "pin to ≥0.2.2" is a maintenance decision worth making explicitly, not a nice-to-have.ERR_MODULE_NOT_FOUND flakiness in the JS test job directly affects whether the team treats front-end tests as trustworthy signal or as noise to be muted.Consider it when all of these hold:
package.json/npm install just to satisfy the test runner.Look elsewhere when:
require-dev and out of deployed artifacts.Given 0.2.x versioning, treat adoption as piloting, not standardizing: the 0.2.2 changelog is a list of real-world layouts that broke, which is a reasonable proxy for "more layouts are out there that haven't broken yet."
To executives: A small, dev-only dependency that lets us write automated tests for our front-end code without adding an npm build pipeline or a second dependency list to maintain. The 0.2.2 release is maintenance-grade — bug fixes, no breaking changes, no new features, nothing to re-architect. It also closes a bug where earlier versions could write files into our source asset directory; that alone justifies pinning to this version if we adopt. Cost is near zero; the upside is test coverage on JS we currently can't test cheaply.
To engineering: Drop-in test-time shim that maps AssetMapper vendor entries into Node-resolvable modules. 0.2.2 fixes three resolution failures (<basename>.index.js directory layouts, subpath file entries, CSS entries shadowing JS entries) and, most importantly, stops writing through existing symlinks into assets/vendor/ — upgrade if you're on 0.2.1 or below, and audit assets/vendor for stray index.js/package.json files if you've already run the old version. Not a runtime dependency; keep it in require-dev. Caveat: it's 0.2.x and only pays off if we're committed to importmap-style vendor assets — if we're on Vite, skip it.
How can I help you explore Laravel packages today?