Skip to content

refactor(modulePreloadPolyfill): move polyfill code to own file #19737

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

privatenumber
Copy link
Contributor

This is a refactor I encountered when working on a separate bug.

This PR refactors the module preload polyfill plugin by separating browser-specific code into its own file. The previous implementation used any types, which reduced type safety.

By moving the polyfill to a dedicated file with appropriate DOM type declarations, the code is now more stable and maintainable. This surfaced the following type error which I fixed:

Type 'NodeListOf<Element>' must have a '[Symbol.iterator]()' method that returns an iterator.ts(2488)

@privatenumber privatenumber marked this pull request as ready for review March 28, 2025 08:03
@privatenumber privatenumber force-pushed the module-preload-polyfill branch from da6f341 to 209caf2 Compare March 28, 2025 08:07
@privatenumber privatenumber marked this pull request as draft March 28, 2025 08:08
@privatenumber privatenumber force-pushed the module-preload-polyfill branch from 209caf2 to 3611035 Compare March 28, 2025 08:13
@privatenumber privatenumber marked this pull request as ready for review March 28, 2025 08:21
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