Skip to content

Commit

Permalink
strip debug info from generated wasm if minify is true (#3671)
Browse files Browse the repository at this point in the history
  • Loading branch information
AurelienRichez authored and devongovett committed Oct 26, 2019
1 parent 5200ecc commit cf83b72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/parcel-bundler/src/assets/RustAsset.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@ class RustAsset extends Asset {
'-o',
this.wasmPath
];
const minifyArgs = this.options.minify ? ['-Clink-arg=-s'] : [];

await exec('rustc', args);
await exec('rustc', [...args, ...minifyArgs]);

// Run again to collect dependencies
this.depsPath = path.join(this.options.cacheDir, name + '.d');
Expand Down

0 comments on commit cf83b72

Please sign in to comment.