Releases: babel/preset-modules
Releases · babel/preset-modules
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
@babel/preset-modules
version 0.1.1 changes the behavior of JSX to fix compatibility with Edge 16-18. This preset originally compiled JSX Spread attributes to Object Spread expressions, however these are not supported in Edge. Instead, as of 0.1.1
JSX Spread is now transpiled to Object.assign()
calls:
// input:
const X = <div a {...b} />
// previous output: (0.1.0):
const X = h('div', { a: true, ...b })
// new output: (0.1.1):
const X = h('div', Object.assign({ a: true }, b))
The raw byte size has increased slightly, but this increase shrinks to near-0 when compressed using Gzip or Brotli, since the repeated Object.assign(
calls are essentially free.