tahamajs's picture
download
raw
747 Bytes
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const NormalModule = require("./NormalModule");
/** @typedef {import("./Compiler")} Compiler */
class LoaderTargetPlugin {
/**
* @param {string} target the target
*/
constructor(target) {
this.target = target;
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.hooks.compilation.tap("LoaderTargetPlugin", compilation => {
NormalModule.getCompilationHooks(compilation).loader.tap(
"LoaderTargetPlugin",
loaderContext => {
loaderContext.target = this.target;
}
);
});
}
}
module.exports = LoaderTargetPlugin;

Xet Storage Details

Size:
747 Bytes
·
Xet hash:
c31e7fd6b9a2f6b3527ecc267644596baa09c1f397006621a432e64e139a50bd

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.