Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit aef571f

Browse files
committed
add externals/globals note
1 parent e2e7738 commit aef571f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

public/docs/ts/latest/cookbook/third-party-lib.jade

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,3 +449,9 @@ code-example(language="json").
449449

450450
A good rule of thumb is to have all `dependencies` specified with a tilde `~`(`~1.2.3`),
451451
while your `peerDependencies` have a range (`"@angular/core": ">=4.0.0 <5.0.0 || >=4.0.0-beta <5.0.0"`).
452+
453+
Any extra dependency or peer Dependency that you add to `package.json` should also be added
454+
to the `globals` and `external` array in the `rollupBaseConfig` variable in `./build.js`.
455+
456+
This ensures your library doesn't package extra libraries inside of it and instead uses the ones
457+
available in the consuming app.

0 commit comments

Comments
 (0)