Skip to content

Commit fb9290a

Browse files
authored
Merge pull request #12928 from marcoYxz/honour-removePragmas-when-bundle-workers
Fix removePragmas command line argument and honour removePragmas in the bundleWorker flow
2 parents ce6c3e2 + 4b81956 commit fb9290a

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,3 +431,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
431431
- [Easy Mahaffey](https://github.com/easymaahffey)
432432
- [Pamela Augustine](https://github.com/pamelaAugustine)
433433
- [宋时旺](https://github.com/BlockCnFuture)
434+
- [Marco Zhan](https://github.com/marcoYxz)

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function handleBuildWarnings(result) {
123123
export async function build() {
124124
// Configure build options from command line arguments.
125125
const minify = argv.minify ?? false;
126-
const removePragmas = argv.pragmas ?? false;
126+
const removePragmas = argv.removePragmas ?? false;
127127
const sourcemap = argv.sourcemap ?? true;
128128
const node = argv.node ?? true;
129129

scripts/build.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@ export async function bundleWorkers(options) {
387387
workerConfig.logOverride = {
388388
"empty-import-meta": "silent",
389389
};
390+
workerConfig.plugins = options.removePragmas
391+
? [stripPragmaPlugin]
392+
: undefined;
390393
} else {
391394
workerConfig.format = "esm";
392395
workerConfig.splitting = true;

0 commit comments

Comments
 (0)