This content originally appeared on Babel Blog and was authored by Nicolò Ribaudo
While preparing the Babel 8.0.0 release (in the next months), we just finished working on a new minor release which includes updates related to @babel/preset-env
, TypeScript 3.8, Flow, and JSX!
A few months ago, Jason Miller started working on @babel/preset-modules
: an experiment to greatly reduce bundle sizes when using the module
/nomodule
pattern. We are excited to announce that its functionality has now been merged into @babel/preset-env
! This means that its optimizations can be applied to all preset-env
targets values, without a separate preset.
Note: These optimizations will be enabled by default in Babel 8. They can be manually enabled in Babel 7.9 by passing in the option { bugfixes: true }
to preset-env
.
This release also has full support for TypeScript 3.8, which introduced explicit type-only imports and exports (i.e. export type { foo }
), and for Flow 0.120, which introduced the declare
modifier for class fields (i.e. class C { declare foo: string }
).
We also worked with the React team to provide a new JSX transform, which will make it possible for React and React-like libraries to further optimize the creation of JSX elements with the addition of the jsx
function vs. React.createElement
.
Lastly, @babel/parser
now supports an additional ECMAScript proposal: Record & Tuple. Please note that this is only parser support, and the transforms are still being worked on.
You can read the whole changelog on GitHub.
This content originally appeared on Babel Blog and was authored by Nicolò Ribaudo
Nicolò Ribaudo | Sciencx (2020-03-16T06:00:00+00:00) 7.9.0 Released: Smaller preset-env output, Typescript 3.8 support and a new JSX transform. Retrieved from https://www.scien.cx/2020/03/16/7-9-0-released-smaller-preset-env-output-typescript-3-8-support-and-a-new-jsx-transform/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.