docs: add Modern Web Platform guide (Web Components, Import Maps, PWA)#8140
Open
phoekerson wants to merge 1 commit intowebpack:mainfrom
Open
docs: add Modern Web Platform guide (Web Components, Import Maps, PWA)#8140phoekerson wants to merge 1 commit intowebpack:mainfrom
phoekerson wants to merge 1 commit intowebpack:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new guide — Modern Web Platform — covering three practical webpack
patterns that are frequently asked about on Discord and the issue tracker but
not yet documented in a single place:
optimization.splitChunkswithcacheGroupsto deduplicate Custom Element registrations across bundles and avoid the
DOMException: Failed to execute 'define' on 'CustomElementRegistry'runtimeerror.
externals,externalsType: "module", andexperiments.outputModuleso webpack output is compatible with browser-nativeimport map resolution.
InjectManifestfromworkbox-webpack-pluginalongside[contenthash]output filenames to keepprecache manifests in sync across builds.
Each section follows the existing guide structure: problem statement → minimal
working configuration → limitations and future work.
Note:
--no-verifywas used locally becausesrc/sw.jshas two pre-existinglint errors (
import/named) unrelated to this PR.This PR is also part of my Google Summer of Code 2026 application to webpack,
where I am proposing to implement native webpack support for these three web
platform features. This documentation reflects my research into the current
state of webpack 5 and the gaps I intend to address during GSoC.
What kind of change does this PR introduce?
docs
Did you add tests for your changes?
No — this is a documentation-only change. No code was modified.
Does this PR introduce a breaking change?
No.
If relevant, what needs to be documented once your changes are merged or
what have you already documented?
This PR is itself the documentation. Once merged, the Modern Web Platform
guide will be accessible at /guides/modern-web-platform/ and automatically
listed in the sidebar via the build system.
Use of AI