-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix: set manifest and read implementation before evaluating remote function files during build #14672
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 4b5406b 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 |
Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
…ions in prerender Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
packages/kit/test/apps/basics/src/routes/remote/prerender/prerender.remote.js
Show resolved
Hide resolved
@copilot We need a patch changeset with a changeset message prefixed with "fix: " and explaining what was fixed |
Co-authored-by: teemingc <54401897+teemingc@users.noreply.github.com>
The changeset was already added in commit ef14986. The file
|
packages/kit/test/apps/basics/src/routes/remote/prerender/prerender.remote.js
Outdated
Show resolved
Hide resolved
packages/kit/test/apps/basics/src/routes/remote/prerender/prerender.remote.js
Outdated
Show resolved
Hide resolved
packages/kit/test/apps/basics/src/routes/remote/prerender/prerender.remote.js
Outdated
Show resolved
Hide resolved
packages/kit/test/apps/basics/src/routes/remote/prerender/prerender.remote.js
Outdated
Show resolved
Hide resolved
packages/kit/test/apps/basics/src/routes/remote/prerender/prerender.remote.js
Outdated
Show resolved
Hide resolved
packages/kit/test/apps/basics/src/routes/remote/prerender/prerender.remote.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it on porpuse that nothing in test.js
(or test.client.js
) is changed/added? Otherwise lgtm.
Summary
Fixed issue where remote function files couldn't use
read()
at the top level during build analysis.Changes Made
prerender.js
: Addedinternal.set_manifest(manifest)
andinternal.set_read_implementation(...)
before loading remote functions (similar to pattern inanalyse.js
)analyse.js
: Clarified thatenv
,read
, andmanifest
are all set before initializationread()
at top-level in a prerender remote function to ensure the fix workswith_read
remote functionRoot Cause
The
prerender.js
file was loading remote function modules without first setting themanifest
andread_implementation
. When remote functions tried to useread()
at the top level, it would fail with "Noread
implementation was provided" error.Fix
Following the same pattern used in
analyse.js
(lines 65-66), set the manifest and read implementation before loading and evaluating remote function modules inprerender.js
. This ensures all necessary context is available when remote function files are imported.Original prompt
Fixes #14671
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.