0.7.1 • Published 4 years ago

babel-plugin-react-local v0.7.1

Weekly downloads
771
License
MIT
Repository
github
Last release
4 years ago

Note: since there is the new JSX transform, it might make sense to prefer the official plugin.

This plugin transforms ES6-style imports from React that cannot be mangled (because with standard options minifiers don't know if property access is constant or not) to local variables.

Example:

// Original code:
function render() {
  const [v, s] = a.b.useState(0)
  return a.b.createElement('p', null, 'Text', v)
}

// Modified code:
const h = a.b.createElement
const { useState: f } = a.b
function render() {
  const [v, s] = f(0)
  return h('p', null, 'Text', v)
}
0.7.1

4 years ago

0.7.0

5 years ago

0.6.3

5 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago