Closed danptr closed 3 years ago
Yep, this is how the loader works, nfortunately it will never work like that. Also:
file-loader
/url-loader
/raw-loader
are deprecated for webpack@5 in favor https://webpack.js.org/guides/asset-modules/ (only custom publicPath is not supported, we are working on it)raw
loader should always return JS codeSo my recommendation - create own loader, logic is simple
Feature Proposal
I'd like to chain another custom loader in front of
file-loader
. However,file-loader
will always returnexport 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 withoutexport default
.