-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
breaking: Standardize resolution order for exported options from route files #11239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
breaking: Standardize resolution order for exported options from route files #11239
Conversation
🦋 Changeset detectedLatest commit: 3e7b838 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
too late 👀 |
The test was whether you could follow directions, you failed |
I think this is one of those cases where it really doesn't make sense to worry about parallelizing promise resolution. No actual work is happening beyond importing modules, so the gains are likely non-existent (and quite possibly offset by all the extra |
Ok thinking out loud a bit more:
|
have put up an alternative PR #11256 |
merged #11256, so I'll close this |
This PR (somewhat by accident) accomplishes two goals:
analyse
, resolving allPromise
-creating functions together. This should hypothetically speed it up for systems that have the resources to make use of the concurrency; previously we wereawait
-ing inside the loops.config
,prerender
, andentries
-- they were inconsistent.The correct resolution order for route-file exports is:
+page
,+page.server
,+server
,+layout
,+layout.server
. The old resolutions were... pretty much all different:prerender
:+page
,+page.server
,+layout
,+layout.server
, (false
, if a page existed, even if+server
exportedprerender
),+server
config
: Honestly bonkers: Merged shallowly down the layout-page tree, except that each layer would only respectuniversal ?? server
, all of which would hard-override anything exported from+server
.entries
: Less-insane, but still wrong:+server
,+page
,+page.server
(entries
not applicable to layouts)These have all been standardized, and are also way easier to reason about than in their current format:
config
is also merged more sensically now:Previously, only
server
ORuniversal
would get merged into the final config at each level.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.