From 18f3b6cbd46a78c858416f943b17f63c075bedf9 Mon Sep 17 00:00:00 2001 From: Richard Simko Date: Wed, 26 Apr 2017 16:58:07 +0200 Subject: [PATCH 1/2] Added info about pitfall for externals Added some info about a pitfall mentioned in webpack/webpack#4771 which is good to keep in mind until the issue is fixed. --- content/guides/author-libraries.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/guides/author-libraries.md b/content/guides/author-libraries.md index aa599a328e02..8a28f2294801 100644 --- a/content/guides/author-libraries.md +++ b/content/guides/author-libraries.md @@ -127,6 +127,8 @@ module.exports = { This means that your library expects a dependency named `lodash` to be available in the consumer's environment. +If your libary targets UMD it's important to add all of the above mentioned ways of loading the external (`commonjs`, `commonjs2`, `amd` and `root`) as leaving one out will cause strange errors for a consumer trying to load your library in that environment. + ### Add `libraryTarget` From 71a7472ce3b5f9c5e31d64eb5482c8a4eedc7b99 Mon Sep 17 00:00:00 2001 From: Greg Venech Date: Wed, 26 Apr 2017 17:30:30 -0400 Subject: [PATCH 2/2] refactor(content): add comma to author-libraries guide --- content/guides/author-libraries.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/author-libraries.md b/content/guides/author-libraries.md index 8a28f2294801..302b9b3139d9 100644 --- a/content/guides/author-libraries.md +++ b/content/guides/author-libraries.md @@ -127,7 +127,7 @@ module.exports = { This means that your library expects a dependency named `lodash` to be available in the consumer's environment. -If your libary targets UMD it's important to add all of the above mentioned ways of loading the external (`commonjs`, `commonjs2`, `amd` and `root`) as leaving one out will cause strange errors for a consumer trying to load your library in that environment. +If your libary targets UMD, it's important to add all of the above mentioned ways of loading the external (`commonjs`, `commonjs2`, `amd` and `root`) as leaving one out will cause strange errors for a consumer trying to load your library in that environment. ### Add `libraryTarget`