Skip to content

Render every package's assets from one line, and stop dropping the tag - #35

Merged
ONyklicek merged 1 commit into
2.xfrom
2.4.2
Aug 10, 2026
Merged

Render every package's assets from one line, and stop dropping the tag#35
ONyklicek merged 1 commit into
2.xfrom
2.4.2

Conversation

@ONyklicek

Copy link
Copy Markdown
Contributor

Three things in the asset surface, none of which changes what a package already renders.

@packageAssets, @packageStyles and @packageScripts now take the short name optionally. Naming none renders every package that declared entries, which is the form an application's own layout wants: a layout that names its packages has to be edited every time one is installed or removed, in every file carrying the line, and package:discover does not close that gap because it discovers providers while the template still names packages by hand. Stylesheets lead across the whole set rather than within each package, though not across the seam between the Vite block and the shipped tags — that block is emitted whole so its preloads stay a single set.

hasAssetFallback() says where to serve a shipped file from when nothing is published. An entry that resolved to nothing rendered no tag at all, which is right for an entry the application declined to build and wrong for the one that is the package's only copy: where public/ cannot be written, a page lost its stylesheet or its behaviour with nothing in the markup, the log or the console to say why, on exactly the deployments least likely to go looking. A package that also serves its assets from a route of its own now keeps the tag, with type="module" or the defer that classic() implies, its attributes, data-navigate-track and the CSP nonce still on it. The resolver is reached only after both the mirror and public/vendor/{name} came back empty, so a normal deployment never calls it.

resolution() no longer reports shipped for a mirrored package whose copy can never be written. The mirrored arm asserted it outright, ahead of every arm that checks anything, so an unwritable public/ looked healthy in php artisan about while the page rendered nothing — and it left fallback unreachable for any mirrored package, which is to say for the default. A copy already published now earns shipped first; a mirrored entry without one earns it only where the mirror could still create it, asked of the nearest existing ancestor of public/vendor/{name} so a read-only public/vendor under a writable public/ is not taken for a writable one. The lazy mirror is unaffected: a fresh install, where about runs before any request has published anything, still reports shipped, and nothing is published to find out.

Three things in the asset surface, none of which changes what a package
already renders.

`@packageAssets`, `@packageStyles` and `@packageScripts` now take the short
name optionally. Naming none renders every package that declared entries,
which is the form an application's own layout wants: a layout that names its
packages has to be edited every time one is installed or removed, in every
file carrying the line, and `package:discover` does not close that gap
because it discovers providers while the template still names packages by
hand. Stylesheets lead across the whole set rather than within each package,
though not across the seam between the Vite block and the shipped tags — that
block is emitted whole so its preloads stay a single set.

`hasAssetFallback()` says where to serve a shipped file from when nothing is
published. An entry that resolved to nothing rendered no tag at all, which is
right for an entry the application declined to build and wrong for the one
that is the package's only copy: where `public/` cannot be written, a page
lost its stylesheet or its behaviour with nothing in the markup, the log or
the console to say why, on exactly the deployments least likely to go
looking. A package that also serves its assets from a route of its own now
keeps the tag, with `type="module"` or the `defer` that `classic()` implies,
its attributes, `data-navigate-track` and the CSP nonce still on it. The
resolver is reached only after both the mirror and `public/vendor/{name}`
came back empty, so a normal deployment never calls it.

`resolution()` no longer reports `shipped` for a mirrored package whose copy
can never be written. The mirrored arm asserted it outright, ahead of every
arm that checks anything, so an unwritable `public/` looked healthy in `php
artisan about` while the page rendered nothing — and it left `fallback`
unreachable for any mirrored package, which is to say for the default. A copy
already published now earns `shipped` first; a mirrored entry without one
earns it only where the mirror could still create it, asked of the nearest
existing ancestor of `public/vendor/{name}` so a read-only `public/vendor`
under a writable `public/` is not taken for a writable one. The lazy mirror
is unaffected: a fresh install, where `about` runs before any request has
published anything, still reports `shipped`, and nothing is published to find
out.
@ONyklicek
ONyklicek merged commit a694be4 into 2.x Aug 10, 2026
59 checks passed
@ONyklicek
ONyklicek deleted the 2.4.2 branch August 10, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant