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:
commit
678c79cc78
23
gulpfile.mjs
23
gulpfile.mjs
@ -419,14 +419,10 @@ function checkChromePreferencesFile(chromePrefsPath, webPrefs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function tweakWebpackOutput(jsName) {
|
function tweakWebpackOutput(jsName) {
|
||||||
const replacer = [];
|
const replacer = [
|
||||||
|
" __webpack_exports__ = {};",
|
||||||
if (jsName) {
|
" __webpack_exports__ = await __webpack_exports__;",
|
||||||
replacer.push(
|
];
|
||||||
" __webpack_exports__ = {};",
|
|
||||||
" __webpack_exports__ = await __webpack_exports__;"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
const regex = new RegExp(`(${replacer.join("|")})`, "gm");
|
const regex = new RegExp(`(${replacer.join("|")})`, "gm");
|
||||||
|
|
||||||
return replace(regex, match => {
|
return replace(regex, match => {
|
||||||
@ -466,8 +462,7 @@ function createScriptingBundle(defines, extraOptions = undefined) {
|
|||||||
);
|
);
|
||||||
return gulp
|
return gulp
|
||||||
.src("./src/pdf.scripting.js")
|
.src("./src/pdf.scripting.js")
|
||||||
.pipe(webpack2Stream(scriptingFileConfig))
|
.pipe(webpack2Stream(scriptingFileConfig));
|
||||||
.pipe(tweakWebpackOutput());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function createSandboxExternal(defines) {
|
function createSandboxExternal(defines) {
|
||||||
@ -547,10 +542,7 @@ function createWebBundle(defines, options) {
|
|||||||
defaultPreferencesDir: options.defaultPreferencesDir,
|
defaultPreferencesDir: options.defaultPreferencesDir,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return gulp
|
return gulp.src("./web/viewer.js").pipe(webpack2Stream(viewerFileConfig));
|
||||||
.src("./web/viewer.js")
|
|
||||||
.pipe(webpack2Stream(viewerFileConfig))
|
|
||||||
.pipe(tweakWebpackOutput());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function createGVWebBundle(defines, options) {
|
function createGVWebBundle(defines, options) {
|
||||||
@ -568,8 +560,7 @@ function createGVWebBundle(defines, options) {
|
|||||||
);
|
);
|
||||||
return gulp
|
return gulp
|
||||||
.src("./web/viewer-geckoview.js")
|
.src("./web/viewer-geckoview.js")
|
||||||
.pipe(webpack2Stream(viewerFileConfig))
|
.pipe(webpack2Stream(viewerFileConfig));
|
||||||
.pipe(tweakWebpackOutput());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function createComponentsBundle(defines) {
|
function createComponentsBundle(defines) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user