zcloud_gbs_qualifications-r.../loaders/pdfjs-dist-patch-loader.cjs

17 lines
468 B
JavaScript
Raw Permalink Normal View History

2026-05-22 08:55:04 +08:00
const replacements = [
["__webpack_exports__", "__pdfjs_dist_exports__"],
["__webpack_module_cache__", "__pdfjs_dist_module_cache__"],
["__webpack_modules__", "__pdfjs_dist_modules__"],
["__webpack_require__", "__pdfjs_dist_require__"],
];
module.exports = function pdfjsDistPatchLoader(source) {
let patchedSource = source;
for (const [from, to] of replacements) {
patchedSource = patchedSource.split(from).join(to);
}
return patchedSource;
};