Getting current entry name within loader

How to get the current entry point’s name from within a loader?

It is needed for a customized file-loader that uses loaderUtils.interpolateName by default which obviously interpolates the [name] to the currently required file name.

In extract-text-webpack-plugin the [name] is interpolated to the entry point name and that’s what I’m for in the customized file-loader (the purpose of which is to aid in toggling source-maps for .less files depending on current environment)

Hence the question. Thanks.

Author: Fantashit

1 thought on “Getting current entry name within loader

Comments are closed.