Skip to content

Commit

Permalink
fix: TypeError require(...) is not a function
Browse files Browse the repository at this point in the history
  • Loading branch information
benurb committed Mar 16, 2018
1 parent 9d27e4d commit 050f189
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extractLoader.js
Expand Up @@ -40,7 +40,7 @@ function extractLoader(content) {

// If the required file is a css-loader helper, we just require it with node's require.
// If the required file should be processed by a loader we do not touch it (even if it is a .js file).
if (/^[^!]*node_modules[/\\]css-loader[/\\].*\.js$/i.test(resourcePath)) {
if (/^[^!]*node_modules[/\\]css-loader[/\\].*\.js$/i.test(absPath)) {
// Mark the file as dependency so webpack's watcher is working for the css-loader helper.
// Other dependencies are automatically added by loadModule() below
this.addDependency(absPath);
Expand Down

0 comments on commit 050f189

Please sign in to comment.