TrySound / rollup-plugin-size-snapshot

Track your library bundles size and its treeshakability with less effort
MIT License
164 stars 12 forks source link

Update terser dependency #61

Open DillonSadofsky opened 2 years ago

DillonSadofsky commented 2 years ago

We are using this plugin plus the rollup-terser-plugin in a couple projects, and in a newer one we started targeting a newer version of ECMA in the output, which lead to some more modern JS features remaining in the js during transpile (for example optional chaining). This choked up rollup-plugin-terser, but updating it fixed it. However, when I use rollup-plugin-size-snapshot, it dies on line 80 because of line 68:

      const minified = (0, _terser.minify)(source).code;

returns undefined due to modern ECMA symbols breaking the version of the terser included as a dependency: image

If it doesn't break anything, it'd be nice to see the terser as a peer dependency or just updated to support modern js features.