Skip to content

Commit

Permalink
Meshopt requires terser options (x3dom#1305)
Browse files Browse the repository at this point in the history
* do not mangle workerProcess
  • Loading branch information
andreasplesch committed Oct 4, 2023
1 parent e4390f4 commit 43e4ebd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build/src-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const zip = require("zip-lib");
const package = require("../package.json");
const packages = require("./core/packages.json");
const additionalFiles = require("./core/additionalFiles.json");
const terser_options = { mangle: { reserved: ['workerProcess'] } };

//--------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -96,15 +97,15 @@ async function build()

console.log( "> Minify x3dom.js ..." );

versions[ "BASIC_MIN" ] = terser.minify( versions[ "BASIC" ] ).code;
versions[ "BASIC_MIN" ] = terser.minify( versions[ "BASIC" ], terser_options ).code;

console.log( "> Minify x3dom-full.js ..." );

versions[ "FULL_MIN" ] = terser.minify( versions[ "FULL" ] ).code;
versions[ "FULL_MIN" ] = terser.minify( versions[ "FULL" ], terser_options ).code;

console.log( "> Minify x3dom-physics.js ..." );

versions[ "PHYSICS_MIN" ] = terser.minify( versions[ "PHYSICS" ] ).code;
versions[ "PHYSICS_MIN" ] = terser.minify( versions[ "PHYSICS" ], terser_options ).code;

console.log( "> Write x3dom.debug.js ..." );

Expand Down

0 comments on commit 43e4ebd

Please sign in to comment.