core icon indicating copy to clipboard operation
core copied to clipboard

It is impossible to check context in loader's include function

Open andrey-skl opened this issue 9 years ago • 0 comments

When I use include: function(path){} parameter for loader, it is impossible to check context (file which requires this path). Example:

    loaders: [
      {
        test: /.svg/,
        include: function(path) {
          //I want to check context here, but it is impossible
          console.log('path', path)
        },
        loader: 'svgo'
      }
   ]

andrey-skl avatar Oct 27 '15 15:10 andrey-skl