This repository was archived by the owner on Aug 8, 2019. It is now read-only.

Description
Using webpack version 4.6.0
I need to resolve the path of a loader using webpack.
The loader is used like this in a node_modules dependency:
const loadedIndex = require('!!../loaders/A-loader!./index.js');
I want to override this loader A-loader with another B-loader.
Here is how my project is structured:
_ directory
|_ node_modules
|_ lib
|_ loaders/A-loader.js
|_ index.js
|_ loaders/B-loader.js
I want to use webpack resolveLoader in order to replace the current A-loader into B-loader.
I'm not sure how to use it, i try but this doesn't work:
{
resolveLoader {
alias: {
'A-loader': 'path/to/my/directory/loaders/B-loaders.js'
}
}
}
Does anybody know how can I solve this?