Skip to content

feat: add runtimeEntry option#1007

Open
itsyoboieltr wants to merge 1 commit into
pmmmwh:mainfrom
itsyoboieltr:feat/runtime-entry-option
Open

feat: add runtimeEntry option#1007
itsyoboieltr wants to merge 1 commit into
pmmmwh:mainfrom
itsyoboieltr:feat/runtime-entry-option

Conversation

@itsyoboieltr

@itsyoboieltr itsyoboieltr commented Jul 1, 2026

Copy link
Copy Markdown

Summary

Adds a runtimeEntry plugin option that controls the React Refresh runtime entry automatically prepended to Webpack entries.

This allows consumers to provide a custom runtime entry, or set runtimeEntry: false to disable automatic injection.

Motivation

This makes the plugin easier to use across different Webpack contexts. Some targets, such as service workers, do not need the default React Refresh runtime entry injected into their bundle.

Allowing runtimeEntry: false lets consumers opt out of automatic injection and register the runtime themselves, while keeping the existing default behavior unchanged for normal browser entries.

Changes

  • Adds runtimeEntry to the options schema and public TypeScript/JSDoc types.
  • Normalizes runtimeEntry to the existing client/ReactRefreshEntry default.
  • Uses the normalized runtimeEntry in getAdditionalEntries, filtering it out when disabled.
  • Documents runtimeEntry in the API docs.
  • Extends focused unit coverage for option normalization, additional entries, and schema validation.

@codesandbox

codesandbox Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@itsyoboieltr itsyoboieltr changed the title [codex] Add runtimeEntry option feat: Add runtimeEntry option Jul 1, 2026
@itsyoboieltr itsyoboieltr marked this pull request as ready for review July 1, 2026 12:15
@itsyoboieltr itsyoboieltr force-pushed the feat/runtime-entry-option branch from 91ffb8b to bfe2ea4 Compare July 1, 2026 12:33
@itsyoboieltr itsyoboieltr force-pushed the feat/runtime-entry-option branch from bfe2ea4 to 2fa598f Compare July 1, 2026 12:47
@itsyoboieltr itsyoboieltr changed the title feat: Add runtimeEntry option feat: add runtimeEntry option Jul 1, 2026
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