Closed timfish closed 5 years ago
@timfish see also the approach in https://github.com/systemjs/builder/pull/818. I wonder how far a 3.x upgrade gets us here?
The v3/master readme says:
- uglify-js@3 has a simplified API and CLI that is not backwards compatible with uglify-js@2.
- uglify-js only supports ECMAScript 5 (ES5).
- Those wishing to minify ES2015+ (ES6+) should use the npm package uglify-es.
I can't see any obvious features that you'd get updating to v3/master. The api changes to v3 are not backwards compatible so I doubted you could just upgrade the package like that. Unless I've missed something obvious! 😄
Ok thanks for checking this. We should definitely stick with this upgrade path then.
I want to using babel-plugin-syntax-dynamic-import
in bundler task, but i have an error in this case. have anybody an idea?
for more details you can see > https://travis-ci.org/behzad888/builder/builds/253923865
@behzad888 it looks like you're running an older version of SystemJS builder, try upgrading to the latest.
@guybedford i'm using latest version of SystemJS builder but new version of uglify-js need to define transpiler SystemJS.config({ transpiler: 'transpiler-module' })
. Although in my local project its ok but travis ci builder has an error as Unable to dynamically transpile ES module
.
How to set transpiler on SystemJS builder test cases?
Seems like uglify-es is no longer supported.
See ‘terser’, it’s replacement fork. On Sun, 30 Sep 2018 at 17:38, Tim Fish notifications@github.com wrote:
Seems like uglify-es is no longer supported.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/systemjs/builder/pull/815#issuecomment-425729594, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkiyjPQYCGX-0ZMNKMP0tjmvQO9rjYdks5ugOV4gaJpZM4OID5O .
This is an initial stab but needs more work.
Now I'm looking through the code I realise the options merging/transformations should really be happening in
processOutputOpts
but there is quite a bit of legacy stuff in there without tests so I'll need to be careful not to break anything.It should support the existing config options:
Or you can pass the entire uglify-es valid config in yourself through
options.uglifyes
: