From 8bec00d516f0ab12028f3db7a3b5de80b90037b7 Mon Sep 17 00:00:00 2001 From: Nathaniel Hill Date: Fri, 1 Feb 2019 11:49:58 -0500 Subject: [PATCH] Add note about monorepo usage --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 4a446f7..3502ccc 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,16 @@ export default { }; ``` +### Usage in monorepo + +In case you are using a monorepo, you may want to use a regular expression for `include` as the string 'node_modules' will not match if your `node_modules` is not in your current working directory (i.e. '../node_modules'). Try this: + +``` +commonjs({ + include: /node_modules/ +}) +``` + ### Custom named exports This plugin will attempt to create named exports, where appropriate, so you can do this...