Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Use terser (uglify-js fork) to support minification of more permissive babel presets #857

Merged
merged 2 commits into from
May 21, 2019

Commits on Jan 24, 2019

  1. Configuration menu
    Copy the full SHA
    17050ae View commit details
    Browse the repository at this point in the history
  2. Use terser to support minification of more permissive babel presets

    Currently, only ES5 javascript can be minified, due to the reliance on
    uglify-js. With terser (a maintained fork of the harmony branch of
    UglifyJS2) it is possible to support a broader range of javascript
    syntax.
    
    The API changed between uglify-js@2 and uglify-js@3 / terser, but the
    translation to the new API was fairly straightforward. It hews more
    closely to the original code than systemjs#815, and consequently I think it
    avoids regressing any features (for instance, the ability to include
    sourceContents in source maps or to control the comment stripping is
    retained).
    
    As browsers continue to support more features beyond ES5, and
    because babel recommends use of the 'env' preset, it will become
    increasingly likely that users' babel transpilation settings will cause
    errors when trying to minify with jspm and friends as long as it uses
    uglify-js.
    
    refs systemjs#815, systemjs#726
    fdintino committed Jan 24, 2019
    Configuration menu
    Copy the full SHA
    a2e7901 View commit details
    Browse the repository at this point in the history