mirror of
https://github.com/wu736139669/Monkey-Test.git
synced 2026-08-06 06:14:53 +00:00
17 lines
476 B
JavaScript
17 lines
476 B
JavaScript
/*
|
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
Author Tobias Koppers @sokra
|
|
*/
|
|
function LoaderTargetPlugin(target) {
|
|
this.target = target;
|
|
}
|
|
module.exports = LoaderTargetPlugin;
|
|
LoaderTargetPlugin.prototype.apply = function(compiler) {
|
|
var target = this.target;
|
|
compiler.plugin("compilation", function(compilation) {
|
|
compilation.plugin("normal-module-loader", function(loaderContext) {
|
|
loaderContext.target = target;
|
|
});
|
|
});
|
|
};
|