> For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt.

# Rule index


List of the error codes

[E1001](#)Duplicate Packages

[E1002](#)Cross Chunks Packages

[E1003](#)Loader Performance Optimization

[E1004](#)ECMA Version Check

[E1005](#)Default Import Check

[E1006](#)Module Mixed Chunks

[E1007](#)Tree Shaking Side Effects Only

[E1008](#)CJS Require Cannot Tree-Shake

[E1009](#)ESM Import Resolved to CJS

E1001Duplicate Packages

bundle

#### Description



There is a same name package which is bundled in multiple versions in your application.



This negatively impacts the bundle size of your application.



#### General Solution



Add an entry in `resolve.alias` to configure Rspack to route any package references to a single specified path.



For example, if `lodash` is duplicated in your bundle, the following configuration would make all Lodash imports refer to the `lodash` instance found at `./node_modules/lodash`:



````
{
  alias: {
    lodash: path.resolve(__dirname, 'node_modules/lodash')
  }
}

````
