webpack-contrib / file-loader

File Loader
MIT License
1.86k stars 257 forks source link

Support for loader chaning #394

Closed danptr closed 3 years ago

danptr commented 3 years ago

Feature Proposal

I'd like to chain another custom loader in front of file-loader. However, file-loader will always return export default <path>, even when chaining is used. This is suboptimal since this output cannot be used directly as input for the next loader which is only interested in the <url> part. I propose a loader option that ensures the loader will return the url without export default.

alexander-akait commented 3 years ago

Yep, this is how the loader works, nfortunately it will never work like that. Also:

So my recommendation - create own loader, logic is simple