mirror of https://github.com/CesiumGS/cesium.git
Merge pull request #12928 from marcoYxz/honour-removePragmas-when-bundle-workers
Fix removePragmas command line argument and honour removePragmas in the bundleWorker flow
This commit is contained in:
commit
fb9290a4d4
|
|
@ -431,3 +431,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
|
|||
- [Easy Mahaffey](https://github.com/easymaahffey)
|
||||
- [Pamela Augustine](https://github.com/pamelaAugustine)
|
||||
- [宋时旺](https://github.com/BlockCnFuture)
|
||||
- [Marco Zhan](https://github.com/marcoYxz)
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ function handleBuildWarnings(result) {
|
|||
export async function build() {
|
||||
// Configure build options from command line arguments.
|
||||
const minify = argv.minify ?? false;
|
||||
const removePragmas = argv.pragmas ?? false;
|
||||
const removePragmas = argv.removePragmas ?? false;
|
||||
const sourcemap = argv.sourcemap ?? true;
|
||||
const node = argv.node ?? true;
|
||||
|
||||
|
|
|
|||
|
|
@ -387,6 +387,9 @@ export async function bundleWorkers(options) {
|
|||
workerConfig.logOverride = {
|
||||
"empty-import-meta": "silent",
|
||||
};
|
||||
workerConfig.plugins = options.removePragmas
|
||||
? [stripPragmaPlugin]
|
||||
: undefined;
|
||||
} else {
|
||||
workerConfig.format = "esm";
|
||||
workerConfig.splitting = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue