cramforce / splittable

Module bundler with support for code splitting, ES6 & CommonJS modules.
Apache License 2.0
945 stars 34 forks source link

Depend on Closure Compiler JS? #1

Closed mohsen1 closed 7 years ago

mohsen1 commented 7 years ago

Java requirement might stop people from trying this. How about using the JS implementation and have an option for using Java executable for performance?

cramforce commented 7 years ago

See https://github.com/cramforce/splittable#possible-improvements

I'm talking to the CC team. The current JS version doesn't support code splitting. That is probably easy to add.

andywer commented 7 years ago

Hey @cramforce.

If I get this right the closure compiler is only for minification of the code. Maybe it's a good idea to keep the minification out of splittable, so people may decide which tool they want to use for minification.

Or maybe implement a command line parameter for delegating minification to some tool: --minify-using 'java -jar compiler.jar' --minify-using 'uglify -c -m'

This way splittable doesn't need to ship with any of those.

OR (yet another idea 😅)

Ship splittable with uglify, since it's way more convenient, and let the user optionally use some other minifier (like the more efficient closure compiler) using an approach like the one mentioned above.

Sorry for the long monolog! 😉

cramforce commented 7 years ago

Hey Andy, you don't get it right this time :) Closure Compiler is at the core of this. It has native code splitting, dead code elimination, etc. Uglify isn't even in the same league. You can still run it on the output if you want.

On Nov 17, 2016 2:47 AM, "Andy Wermke" notifications@github.com wrote:

Hey @cramforce https://github.com/cramforce.

If I get this right the closure compiler is only for minification of the code. Maybe it's a good idea to keep the minification out of splittable, so people may decide which tool they want to use for minification.

Or maybe implement a command line parameter for delegating minification to some tool: --minify-using 'java -jar compiler.jar' --minify-using 'uglify -c -m'

This way splittable doesn't need to ship with any of those.

OR (yet another idea 😅)

Ship splittable with uglify, since it's way more convenient, and let the user optionally use some other minifier (like the more efficient closure compiler) using an approach like the one mentioned above.

Sorry for the long monolog! 😉

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/cramforce/splittable/issues/1#issuecomment-261215404, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFeT_r3CjCoCb5_GQV_4zeX2snT12gsks5q_DCwgaJpZM4K0y0z .