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

fix(gatsby): re-add prefetch/preload links for child assets #29693

Merged
merged 2 commits into from
Feb 23, 2021

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Feb 22, 2021

Description

This re-adds prefetch/preload links from webpack's magic comments ( import(/* webpackChunkName: "<chunk_name>", webpackPrefetch: true */ "<path_to_module>"))

TODO:

  • add at least rudimentary tests to artifacts

Related Issues

[ch25483]

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 22, 2021
@pieh pieh added topic: webpack/babel Webpack or babel and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Feb 22, 2021
}
}

const webpackStats = {
...stats.toJson({ all: false, chunkGroups: true }),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

gatsby itself no longer need those, so we maybe could remove it, I'm just not sure if some plugins might rely on this, so it IS safer to keep it :/

@pieh pieh marked this pull request as ready for review February 23, 2021 11:10
Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

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

LGTM! awesome! 🎉

@pieh pieh merged commit 170c604 into master Feb 23, 2021
@pieh pieh deleted the v3/webpack5-child-assets branch February 23, 2021 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: webpack/babel Webpack or babel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants