Skip to content

Commit

Permalink
Merge pull request mozilla#17678 from Snuffleupagus/pr-17637-followup
Browse files Browse the repository at this point in the history
Remove unneeded `tweakWebpackOutput` usage in the gulpfile (PR 17637 follow-up)
  • Loading branch information
timvandermeij authored Feb 17, 2024
2 parents fd5d040 + 751611f commit 678c79c
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions gulpfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 678c79c

Please sign in to comment.