Webpack: Getting current entry name within loader

Created on 23 Aug 2015  路  1Comment  路  Source: webpack/webpack

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.

question

>All comments

Closing as duplicate of #2090.

You can also consider asking the same question at Stack Overflow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adjavaherian picture adjavaherian  路  3Comments

nwhite89 picture nwhite89  路  3Comments

dubrowgn picture dubrowgn  路  3Comments

abergs picture abergs  路  3Comments

d4goxn picture d4goxn  路  3Comments