webpack / loader-runner

Runs (webpack) loaders
MIT License
302 stars 60 forks source link

'this.fs' does not work from inside the module #35

Open renanmt opened 5 years ago

renanmt commented 5 years ago

Hi, I'm running into this issue when trying to load a file from inside the loader: `ReferenceError: fs is not defined

  35 |     console.log(this.getDependencies());
  36 | 
> 37 |     fs.readFile(fileToSearch, 'utf8', (error, data) => {
     |     ^`

Error doesn't happen when running from webpack config. Only with loader-runner.

Could you help me out?