I've implemented custom resolver according to this answer. I've got entry.js
file which requires zuka/core
module like this:
require('zuka/core');
document.write("It works.");
I have the following webpack.config.js file:
const MyConventionResolver = require('./MyConventionResolver');
const webpack = require('webpack');
module.exports = {
entry: "./entry.js",
output: {
path: __dirname + "/dist",
filename: "bundle.js"
},
plugins: [
new webpack.ResolverPlugin([
new MyConventionResolver()
])
]
};
The problem is that I don't get request.path
that contains zuka/core
inside resolver.plugin('module', function(request, callback) {
function, however I do get other paths, so my plugin is working. Why don't I get zuka/core
? Webpack also emits error that zuka/core
is not found.