UNPKG
babel-plugin-transform-loadable-component
Version:
latest (1.0.14)
1.0.14
1.0.0-rc.7
1.0.0-rc.6
1.0.0-rc.5
1.0.0-rc.4
1.0.0-rc.1
1.0.0-rc.0
1.0.0-alpha.2
1.0.0-alpha.1
1.0.0-alpha.0
1.0.0-4.0
Transform react component to loadable component
babel-plugin-transform-loadable-component
/
__tests__
/
fixtures
/
with-existing-react-loadable-import
/
actual.js
15 lines
(12 loc)
•
289 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import
React
from
'react'
import
Component
from
'react-component'
import
Loadable
from
'react-loadable'
import
{
Button
}
from
'@aliwind'
const
MyComponent
= (
) => (
<
Button
component
=
{Component}
__loading
=
{()
=>
(
<
div
>
123
</
div
>
)} __async />
)
export
default
MyComponent