4 ms·
Has anyone outside of Google had any luck using the closure compiler with a modern-ish stack with the advanced optimizations? Tsickle and the like seem to be a
by MisterKent 2y ago
Has anyone outside of Google had any luck using the closure compiler with a modern-ish stack with the advanced optimizations?
Tsickle and the like seem to be archived as well, so it's unclear to me. Google must internally have some tooling to go from ts to closureJS?
- esprehn 2y agoThey archived the open source parts , but it's the same stack internally.
- MisterKent 2y agoSo they just stopped sharing it publicly? That's kinda odd.
- cpcallen 2y agoDoing open source releases takes engineering time, and the internal tooling teams are amongst those that have been hit by layoffs[1], so keeping GitHub up to date is probably not a big priority for them. [1]: https://techcrunch.com/2024/05/01/google-lays-off-staff-from-flutter-dart-python-weeks-before-its-developer-conference/ https://techcrunch.com/2024/05/01/google-lays-off-staff-from...
- thayne 2y agotsickle doesn't look archived to me: https://github.com/angular/tsickle https://github.com/angular/tsickle Lucid Software migrated their code from closure compiler JS to typescript, and continue to use the closure compiler with advanced optimizations. See https://lucid.co/techblog/2017/11/16/converting-600k-lines-to-typescript-in-72-hours https://lucid.co/techblog/2017/11/16/converting-600k-lines-t.... It would not at all surprise me if google internally has better tooling than what they have open sourced though.
- MisterKent 2y agoDid you not see the readme in that repo? It's no longer being maintained, with the last commit being years ago. I imagine it's lacking a lot of typescripts newer features etc. seems hard to justify using it
- AshleysBrain 2y agoWe relied on Closure Compiler for years, but we're now moving off it to ESBuild + UglifyJS. Closure has the most advanced minification, but these days it's not well maintained - it's lacking support for modern JavaScript features like dynamic imports and private fields, it's not clear when or if any of that will be supported, releases have reduced to every ~6 months, and all too often if you file a bug the response is "this doesn't affect Google, tough luck". So unfortunately despite having the best minification I can't recommend it any more - it's basically a Google-internal project that happens to be on GitHub. UglifyJS looks like a better option these days.
- no_wizard 2y agoYou should consider terser over uglifyJS, it’s far better maintained and will get you the same if not better results
- adrianh 2y agoYes, I've used Closure Compiler with advanced optimizations for the Soundslice JS codebase, for around 10 years. It is so, so good! You have to take care to write code in a certain way, but once you understand the constrants it's not a big deal. The advanced optimizations are better than anything else I've seen in the JS world, and it's not even close. It's just insanely good.
- rudasn 2y agoOh wow soundslice has been around for 10 years already? What an amazing project, well done!
- kccqzy 2y agoA long time ago when I was a full-stack developer, my opinion was that the Closure compiler with its advanced optimizations was so worthwhile that I was willing to change my code style to make it work. That includes not using new JS features not supported by the compiler. But then again my introduction to JS was Douglas Crockford's JavaScript: The Good Parts and I write a lot of C++ so I'm always content with the idea of using only a subset of the language.