From d23866f69e8249765f42f2353bc8f0ef47364e7a Mon Sep 17 00:00:00 2001 From: Brent Jackson Date: Tue, 19 Jun 2018 16:38:14 -0400 Subject: [PATCH] Filter node_modules --- README.md | 3 ++- src/entry.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e4c1aab..8d012e5 100644 --- a/README.md +++ b/README.md @@ -368,7 +368,8 @@ See the [example](https://github.com/c8r/x0/tree/master/examples/webpack-config) **REMOVE BEFORE MERGING** -- [ ] props.Component in custom apps +- [ ] require.context `_app` +- [ ] props.Component/children in custom apps - [ ] peer deps - [ ] Head component with react helmet - [ ] changelog/docs diff --git a/src/entry.js b/src/entry.js index 7d5d9ce..e92d0e2 100644 --- a/src/entry.js +++ b/src/entry.js @@ -27,6 +27,7 @@ const { filename, basename = '', disableScroll } = OPTIONS const index = filename ? path.basename(filename, path.extname(filename)) : 'index' const getComponents = req => req.keys() + .filter(minimatch.filter('!node_modules')) .filter(key => !MATCH || minimatch(key.replace(/^\.\//, ''), MATCH)) .filter(key => !/^_/.test(path.basename(key))) .map(key => ({