私はthis answerに従ってカスタムリゾルバを実装しました。Webpackカスタム解決プラグイン:コールバックが必要なパスを受け取りません
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()
])
]
};
問題は、私はrequest.path
を取得しないということである含まれています。私は、次のwebpack.config.jsファイルを持っている
require('zuka/core');
document.write("It works.");
:私はこのようなzuka/core
モジュールを必要とentry.js
ファイルを持っていますzuka/core
内部にはresolver.plugin('module', function(request, callback) {
という機能がありますが、私は他のパスを取得するので、私のプラグインは機能しています。なぜ私はzuka/core
を得られないのですか? Webpackもzuka/core
が見つかりません。