Buckets:
tahamajs/Other_Lessons / AP /TA_1 /AP-ECE-UT.github.io /node_modules /webpack /lib /LoaderTargetPlugin.js
| /* | |
| MIT License http://www.opensource.org/licenses/mit-license.php | |
| Author Tobias Koppers @sokra | |
| */ | |
| ; | |
| 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.