Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Commit

Permalink
Merge pull request #37 from kadirahq/regex-test-whole-path
Browse files Browse the repository at this point in the history
Test regex for the whole path instead of just the filename
  • Loading branch information
roonyh authored Oct 9, 2016
2 parents a141db2 + 45f381a commit 54a8112
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/require_context.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function requireModules(keys, root, directory, regExp, recursive) {
const files = fs.readdirSync(path.join(root, directory));

files.forEach((filename) => {
if (regExp.test(filename)) {
if (regExp.test(path.join(directory, filename))) {
// webpack adds a './' to the begining of the key
// TODO: Check this in windows
const entryKey = `./${path.join(directory, filename)}`;
Expand Down

0 comments on commit 54a8112

Please sign in to comment.