glob-loader icon indicating copy to clipboard operation
glob-loader copied to clipboard

does not seem to work in my environment

Open nadavsinai opened this issue 9 years ago • 2 comments

Hey, I'm trying to use your loader to convert an app to webpack I need glob requiring until we get proper in file requiring of dependencies.

I run io.js 2.3.5 on linux (fedora) i try to do use it inline : require("glob-loader!./modules//.js");

but it gives me the follwing error Module not found: Error: Cannot resolve 'file' or 'directory' ./modules//.js in /home/nadavsinai/sites/startapp/portal/public @ ./application.js 46:0-39 can you spot my problem?

nadavsinai avatar Sep 05 '15 19:09 nadavsinai

In current implementation, specifying glob pattern directly in require argument does not work.

Instead this would work:

  • Add a separate pattern file (example: modules.pattern) which contains glob pattern
> cat modules.pattern
./modules/**/*.js
  • require("glob-loader!./modules.pattern")

seanchas116 avatar Sep 06 '15 06:09 seanchas116

This would be a useful component for my purposes if we could do the glob inline. +1 for adding support for that.

toddpi314 avatar Oct 23 '15 17:10 toddpi314