From a2a0cb179cd3c1efa5228ae489b1e816de27f32c Mon Sep 17 00:00:00 2001 From: Nathaniel Hill Date: Tue, 2 Apr 2019 01:58:42 -0500 Subject: [PATCH] Add note about monorepo usage (#372) --- 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...