Skip to content

Improve preload handling with runtime self hosting#852

Merged
sebastianbenz merged 1 commit intomainfrom
rewrite-preload
Jul 7, 2020
Merged

Improve preload handling with runtime self hosting#852
sebastianbenz merged 1 commit intomainfrom
rewrite-preload

Conversation

@sebastianbenz
Copy link
Copy Markdown
Collaborator

  • remove v0.js preloads if esm mode is enabled (the esm modules should
    be preloaded instead)
  • rename existing v0.js preloads

* remove v0.js preloads if esm mode is enabled (the esm modules should
be preloaded instead)
* rename existing v0.js preloads
Copy link
Copy Markdown
Collaborator

@patrickkettner patrickkettner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


// process preloads later to avoid accidently rewriting the URL
for (const preload of preloads) {
if (preload) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when would this be false?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some scripts should not have a preload. In that case rewrite URL returns null.

@sebastianbenz sebastianbenz merged commit 80e4ba3 into main Jul 7, 2020
@sebastianbenz
Copy link
Copy Markdown
Collaborator Author

Thanks for the review

@sebastianbenz sebastianbenz deleted the rewrite-preload branch July 7, 2020 06:48
tharders pushed a commit that referenced this pull request Aug 17, 2020
* remove v0.js preloads if esm mode is enabled (the esm modules should
be preloaded instead)
* rename existing v0.js preloads
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