0.7.1 • Published 2 years ago

babel-plugin-react-local v0.7.1

Weekly downloads
771
License
MIT
Repository
github
Last release
2 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

2 years ago

0.7.0

4 years ago

0.6.3

4 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago