Your suggestion does not work and no asset file is being emitted by the generator. See my demo-changes and the build log:
- [URL]
- [URL]

My intention of this issue thread is not seeking for help or asking a question, but reporting a bug/regression in Webpack 5 as it has deprecated the `{file,raw,url}-loader`s in favor of native asset modules and currently it's not possible to load assets from within a loader (while loading them from regular imports works - of course).

Also, special syntax should not be needed for this, because otherwise it's a breaking change, and this is not documented. And if this is indeed needed, then how is a loader supposed to know when a certain request is an asset and when not? This is not the job of the loader but the module rules configuration and webpack resolving it correctly.

----

I haven't found any documentation in regards to this request syntax and thus took a look at the code and found the responsible parts in the `resolve` hook of the `NormalModuleFactory`.
- https://github.com/webpack/webpack/blob/6a4cb8e39d717ef3d710eaebd3db31accf229dec/lib/NormalModuleFactory.js#L353-L374
- [URL]

While setting breakpoints and debugging through this code, it looks like a simple type override, but unfortunately it doesn't do anything in this case. The `this.ruleSet.exec` call from above which is supposed to find the rule where the asset type is defined (I think) doesn't return anything either.