Files
klz-cables.com/.pnpm-store/v10/files/aa/9e5d69a2ff9a3ca1cbbec81eee6e3dd6f6204466ef62a8cd9abdaa3d2de51bdb6b88887511499021b9fd61796f245ecb93953f5def7d999227ffcbf28761b4
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

40 lines
776 B
Plaintext

/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const NormalModule = require("./NormalModule");
/** @typedef {import("./Compiler")} Compiler */
const PLUGIN_NAME = "LoaderTargetPlugin";
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(PLUGIN_NAME, (compilation) => {
NormalModule.getCompilationHooks(compilation).loader.tap(
PLUGIN_NAME,
(loaderContext) => {
loaderContext.target = this.target;
}
);
});
}
}
module.exports = LoaderTargetPlugin;