Conversation
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.
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.
Three things in the asset surface, none of which changes what a package already renders.
@packageAssets,@packageStylesand@packageScriptsnow 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, andpackage:discoverdoes 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: wherepublic/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, withtype="module"or thedeferthatclassic()implies, its attributes,data-navigate-trackand the CSP nonce still on it. The resolver is reached only after both the mirror andpublic/vendor/{name}came back empty, so a normal deployment never calls it.resolution()no longer reportsshippedfor a mirrored package whose copy can never be written. The mirrored arm asserted it outright, ahead of every arm that checks anything, so an unwritablepublic/looked healthy inphp artisan aboutwhile the page rendered nothing — and it leftfallbackunreachable for any mirrored package, which is to say for the default. A copy already published now earnsshippedfirst; a mirrored entry without one earns it only where the mirror could still create it, asked of the nearest existing ancestor ofpublic/vendor/{name}so a read-onlypublic/vendorunder a writablepublic/is not taken for a writable one. The lazy mirror is unaffected: a fresh install, whereaboutruns before any request has published anything, still reportsshipped, and nothing is published to find out.