Switch Rollup minifier plugin to rollup-plugin-terser#4203
Switch Rollup minifier plugin to rollup-plugin-terser#4203daviwil merged 8 commits intoAzure:masterfrom
Conversation
There was a problem hiding this comment.
Noticed that core-auth didn't have the tree-shaking test fix that was introduced in #3997 so I added it here so that tests will run correctly.
|
LGTM! For history: I would have definitely adopted terser back when I was working on Storage a year ago, but it was riddled with bugs. Since we required the |
XiaoningLiu
left a comment
There was a problem hiding this comment.
@bterlson Storage still targets es5, which bugs you mentioned by changing to terser?
As the promise to support IE in current V10 GA storage SDKs, changing to es6 seems not appliable.
2942c94 to
c23025a
Compare
c23025a to
335caa5
Compare
|
Since tests are passing, I think that the terser-derived output must be working fine. I'll go ahead and merge this now so that all of our packages are configured consistently. If we notice any issues with specific packages we can revert them individually to use |
|
@XiaoningLiu I don't recall anything affecting ES5 patterns so I think this upgrade is fine. |
In PR #4165, @bterlson recommended that I use
rollup-plugin-terserinstead ofrollup-plugin-uglifyto mitigate an issue where an ES6 class definition caused the minifier to throw an error about an unexpected token. @HarshaNalluru asked whether we should be using this everywhere, so this PR is an attempt to get us moved over torollup-plugin-terseranywhere thatrollup-plugin-uglifyis being used. Thekeyvaultlibraries andcore-httpboth useuglifyjsdirectly (they probably shouldn't) so I didn't update those at this time (but I can if folks feel strongly about it).I've made changes for each library in individual commits so it's easy to drop any that we don't feel should be moved over!