我正在编写一个自定义的加载器,需要获取加载器中入口文件的名称。这个问题已经在Webpack Github上问过两次,在File-loader Github上也问过一次。
这个在开发模式下对我有效:
module.exports = function loader(source) { const file = this._module.resource; ... }
this.resourcePath
this.resourcePath
吗? - Alireza