Merge pull request #17678 from Snuffleupagus/pr-17637-followup

Remove unneeded `tweakWebpackOutput` usage in the gulpfile (PR 17637 follow-up)
This commit is contained in:
Tim van der Meij 2024-02-17 14:58:24 +01:00 committed by GitHub
commit 678c79cc78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -419,14 +419,10 @@ function checkChromePreferencesFile(chromePrefsPath, webPrefs) {
}
function tweakWebpackOutput(jsName) {
const replacer = [];
if (jsName) {
replacer.push(
" __webpack_exports__ = {};",
" __webpack_exports__ = await __webpack_exports__;"
);
}
const replacer = [
" __webpack_exports__ = {};",
" __webpack_exports__ = await __webpack_exports__;",
];
const regex = new RegExp(`(${replacer.join("|")})`, "gm");
return replace(regex, match => {
@ -466,8 +462,7 @@ function createScriptingBundle(defines, extraOptions = undefined) {
);
return gulp
.src("./src/pdf.scripting.js")
.pipe(webpack2Stream(scriptingFileConfig))
.pipe(tweakWebpackOutput());
.pipe(webpack2Stream(scriptingFileConfig));
}
function createSandboxExternal(defines) {
@ -547,10 +542,7 @@ function createWebBundle(defines, options) {
defaultPreferencesDir: options.defaultPreferencesDir,
}
);
return gulp
.src("./web/viewer.js")
.pipe(webpack2Stream(viewerFileConfig))
.pipe(tweakWebpackOutput());
return gulp.src("./web/viewer.js").pipe(webpack2Stream(viewerFileConfig));
}
function createGVWebBundle(defines, options) {
@ -568,8 +560,7 @@ function createGVWebBundle(defines, options) {
);
return gulp
.src("./web/viewer-geckoview.js")
.pipe(webpack2Stream(viewerFileConfig))
.pipe(tweakWebpackOutput());
.pipe(webpack2Stream(viewerFileConfig));
}
function createComponentsBundle(defines) {