esbuild icon indicating copy to clipboard operation
esbuild copied to clipboard

Feature Request: Merge small chunks into one chuck; having a capability to configure

Open dipu7388 opened this issue 7 months ago • 1 comments

Description

Currently, when exporting constants or any file which a multiple exports in our project, each export generates a separate chunk during the build process. For example, a file like global.constants.ts with exports such as:

export const A = 0;
export const B = 1;
export const C = 2;
results in three separate chunks being generated.

Requested Feature
We would like to request a feature that allows us to merge these separate chunks into a single chunk during the build process. This capability would help in reducing the number of HTTP requests and improving loading times by bundling related exports into a single chunk.


### Steps to Reproduce
1. Clone the repository with the specific branch:
   ```bash
   git clone -b native-federation https://github.com/dipu7388/multiple-entry.git
   cd multiple-entry

dipu7388 avatar Jul 10 '24 07:07 dipu7388