我使用的分布作为UMD模块lib和代码从我正在导入看起来像这样模块未装载必须具有正常或音调功能
lib.js文件的一个
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(['exports', '../utils/require-isdefined-plugin!lodash'], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require('lodash'));
} else {
var mod = {
exports: {}
};
factory(mod.exports, global.lodash);
global.registry = mod.exports;
}
})(this, function (exports, _lodash) {
'use strict';
// Library code
})
,现在当我使用这个lib.js在我的代码和运行的WebPack,它抛出这个错误
错误:模块“H:\项目\ ABC \ UMD \程序\ utils的\要求-isdefined-插件.js'不是加载程序(必须具有正常或音调功能)
我认为是的WebPack治疗“../utils/require-isdefined-plugin”作为装载机和抱怨。
我的问题是如何,我让的WebPack知道这是不是一个加载并执行此文件通常或
有没有其他的办法,使这项工作?