-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Announcing Scala.js 1.16.0. #631
Conversation
title: Announcing Scala.js 1.16.0 | ||
category: news | ||
tags: [releases] | ||
permalink: /news/2023/01/26/announcing-scalajs-1.16.0/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong date?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! Good catch.
This is why Scala.js has leveraged Closure since the very first relase. | ||
Closure's so-called "advanced optimizations" assume that the JavaScript program fits in a specific subset of semantics, which allows it to rename properties. | ||
|
||
Unfortunately, despite ECMAScript modules being standard for several years now, Closure has never supported them in the way we need it to. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this sentence is a bit misleading. IIUC we could use GCC with CJS modules because it doesn't support (i.e. ignores) them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rephrased. Is it better now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This has resulted in large bundle sizes for users of ES modules. | ||
|
||
Our minifier, which is aware of our types and of Scala.js semantics, fills that gap between Closure and general-purpose minifiers. | ||
When combined with a general-purpose minifier such as the one bundled with Vite, the new optimizations bring code size around 15% bigger than Closure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because Closure had several engineers working on it for more than a decade, probably. ;)
More precisely, because we don't do everything that could be done. At least not yet. It's likely that we will get progressively closer, over time.
For announcement on Tuesday, assuming everything goes well.