-
Notifications
You must be signed in to change notification settings - Fork 0
GDB-12871 bundle all plugins for easier loading #6
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
base: main
Are you sure you want to change the base?
GDB-12871 bundle all plugins for easier loading #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR changes the webpack configuration to bundle all plugins into a single file for easier loading. It replaces the previous approach of generating individual plugin entry points using glob patterns with a new bundled approach using a central plugins-bundle.js
file that auto-discovers and registers all plugins.
- Modified webpack config to use a single entry point instead of glob-based individual plugin files
- Created a new plugins bundle file with auto-discovery functionality for plugin registration
- Updated webpack optimization settings to prevent code splitting
- Updated documentation generation reflecting the bundled plugin structure
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
webpack.config.js | Changes entry point from glob-discovered individual files to single bundle, adds optimization settings to prevent splitting |
plugins/plugins-bundle.js | New auto-discovery bundle file that finds and registers all plugins using webpack context |
scripts/post-jsdoc.js | Minor code style update (arrow function formatting) |
docs/*.html | Generated documentation updates reflecting the new bundled structure |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
c1c984d
to
baee64f
Compare
c932b50
to
74dde4e
Compare
|
||
// Public API: register all discovered plugins. | ||
export function register(registry) { | ||
for (const register of registerFns) register(registry); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expand this for cycle with curly braces
## What - Replace per-plugin packaging with a single bundled file. - Update the plugins manifest to describe the bundled package instead of individual plugins. ## Why Previously, each plugin required its own network request. Bundling reduces this to a single request, improving load performance. ## How A script was added that iterates through all plugin modules and collects them into an array. It then creates a module with a register function, which loops over the array of plugin modules and registers each one in sequence. This PR changes the webpack configuration to bundle all plugins into a single file for easier loading. It replaces the previous approach of generating individual plugin entry points using glob patterns with a new bundled approach using a central plugins-bundle.js file that auto-discovers and registers all plugins. Modified webpack config to use a single entry point instead of glob-based individual plugin files Created a new plugins bundle file with auto-discovery functionality for plugin registration Updated webpack optimization settings to prevent code splitting
74dde4e
to
fe68f65
Compare
What
Why
Previously, each plugin required its own network request. Bundling reduces this to a single request, improving load performance.
How
A script was added that iterates through all plugin modules and collects them into an array. It then creates a module with a register function, which loops over the array of plugin modules and registers each one in sequence.
This PR changes the webpack configuration to bundle all plugins into a single file for easier loading. It replaces the previous approach of generating individual plugin entry points using glob patterns with a new bundled approach using a central plugins-bundle.js file that auto-discovers and registers all plugins.
Modified webpack config to use a single entry point instead of glob-based individual plugin files
Created a new plugins bundle file with auto-discovery functionality for plugin registration
Updated webpack optimization settings to prevent code splitting