If I have a entry hello.js
like this:
require('./images/test.png');
and I use file-loader
to handle this, then I want the built image named as “hello.test.png”,how can I make it?
The following example can not fill my need:
{
test: /\.(jpe?g|png|gif|svg)$/i,
loaders: ['file?hash=sha512&digest=hex&name=[path][hash].[ext]']
}
recursive issue references here #1381 is pointing back to this one each citing a duplicate of the other 🙂
Finally, guys, is there a way to get entry point name in a custom loader?
The only way, I found was to explore the
reasons
of the module directly in the loader.Thanks FuriouZz, here’s a small modification to make it work with HMR as well:
This issue had no activity for at least half a year.
It’s subject to automatic issue closing if there is no activity in the next 15 days.