Skip to content

Conversation

svilenvelikov
Copy link
Contributor

@svilenvelikov svilenvelikov commented Aug 29, 2025

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

@Copilot Copilot AI review requested due to automatic review settings August 29, 2025 15:06
Copy link

@Copilot Copilot AI left a 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.

@svilenvelikov svilenvelikov marked this pull request as draft August 29, 2025 15:09
@boyan-tonchev boyan-tonchev force-pushed the GDB-12871-bundle-plugins-for-loading-optimization branch from c1c984d to baee64f Compare October 2, 2025 13:27
@boyan-tonchev boyan-tonchev marked this pull request as ready for review October 2, 2025 13:40
@boyan-tonchev boyan-tonchev force-pushed the GDB-12871-bundle-plugins-for-loading-optimization branch 2 times, most recently from c932b50 to 74dde4e Compare October 2, 2025 13:47

// Public API: register all discovered plugins.
export function register(registry) {
for (const register of registerFns) register(registry);
Copy link
Contributor

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
@boyan-tonchev boyan-tonchev force-pushed the GDB-12871-bundle-plugins-for-loading-optimization branch from 74dde4e to fe68f65 Compare October 3, 2025 07:39
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.

2 participants