Skip to content
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

feat(runtime): allow onload hook to return wrapped module #1987

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

ScriptedAlchemy
Copy link
Member

@ScriptedAlchemy ScriptedAlchemy commented Jan 18, 2024

Description

Allows export proxies and wrappers around the module that is loaded.

This enables things like SSR, where we can track function invocation not chunk load to register args.id from the onload hook.
This allows us to return preload scripts in DOM with server rendering etc.
Allows wrapping in error boundaries or adapters

Related Issue

#1985
#1984

the terminal is displaying logs in repetition for each time it is executed again. Able to intercept exports function calls
image

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

@ScriptedAlchemy ScriptedAlchemy merged commit 2d774d1 into main Jan 19, 2024
11 checks passed
@ScriptedAlchemy ScriptedAlchemy deleted the feat/onload-hook-return branch January 19, 2024 06:21
@zhoushaw zhoushaw mentioned this pull request Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants