Files
klz-cables.com/.pnpm-store/v10/files/66/b278b30178372d55cdd250bec5aa279644f2a3d71614e52897c72e6652449badd45e15e3f8981aea30c7fe915e8935a10ca0cb6633349eb7a6db8092f61474
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

39 lines
951 B
Plaintext

/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
/** @typedef {import("../../declarations/WebpackOptions").PublicPath} PublicPath */
/** @typedef {import("../Compilation")} Compilation */
class PublicPathRuntimeModule extends RuntimeModule {
/**
* @param {PublicPath} publicPath public path
*/
constructor(publicPath) {
super("publicPath", RuntimeModule.STAGE_BASIC);
/** @type {PublicPath} */
this.publicPath = publicPath;
}
/**
* @returns {string | null} runtime code
*/
generate() {
const { publicPath } = this;
const compilation = /** @type {Compilation} */ (this.compilation);
return `${RuntimeGlobals.publicPath} = ${JSON.stringify(
compilation.getPath(publicPath || "", {
hash: compilation.hash || "XXXX"
})
)};`;
}
}
module.exports = PublicPathRuntimeModule;