Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
Added support for user-defined pkg config for 3rd party dependencies (#…
Browse files Browse the repository at this point in the history
…868)

Co-authored-by: György Kovács <gyorgy.kovacs@goodgrind.tech>
Co-authored-by: Igor Klopov <igor@klopov.com>
  • Loading branch information
3 people authored May 10, 2020
1 parent 64c4042 commit 66b7326
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/walker.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,16 @@ class Walker {

await this.readDictionary();

// Populate dictionary with user-defined entries
const pkgConfig = marker.config.pkg;
if (pkgConfig) {
const externals = pkgConfig.externals || {};
for (const name in externals) {
// Wrapper object with "pkg" field added here so it can be omitted in original config
this.dictionary[name] = { pkg: externals[name] };
}
}

this.append({
file: entrypoint,
marker,
Expand Down

0 comments on commit 66b7326

Please sign in to comment.