Skip to content

Commit 23be28d

Browse files
Harrison IfeanyichukwuHarrison Ifeanyichukwu
Harrison Ifeanyichukwu
authored and
Harrison Ifeanyichukwu
committed
fix: only add peer dependency modules
1 parent 2360c88 commit 23be28d

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ You can override these options by creating and placing a `.buildrc.js` file in y
434434

435435
- **enabled** - defines if a specific build type is enabled. By default, **Node.JS** lib build is enabled, while browser based dist build is disabled.
436436

437-
- **externals**: Defines list of external modules. By default, peerDependency and dependency modules are read from your project's package.json file and included automatically when generating lib builds. So you don't add those.
437+
- **externals**: Defines list of external modules. By default, `peerDependency` modules are read from your project's package.json file and included automatically when generating lib builds. So you don't need to add those.
438438

439439
## Contributing
440440

src/modules/Bundler.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ export default class Bundler {
100100
this.mergeConfig(prop, resolvedConfig, resolvedConfig.distConfig);
101101
});
102102

103-
//for lib config, add all dependencies as externals
104-
if (packageFile.dependencies) {
105-
Object.keys(packageFile.dependencies).forEach(key => resolvedConfig.libConfig.externals.push(key));
106-
}
107103
//for lib config, add all per dependencies as externals
108104
if (packageFile.peerDependencies) {
109105
Object.keys(packageFile.peerDependencies).forEach(key => resolvedConfig.libConfig.externals.push(key));

0 commit comments

Comments
 (0)