mirror of
https://github.com/gregberge/loadable-components.git
synced 2026-01-18 15:12:26 +00:00
18 lines
386 B
JavaScript
18 lines
386 B
JavaScript
/* eslint-disable */
|
|
import Loadable from 'react-loadable'
|
|
|
|
const Loading = props => {
|
|
if (props.error || props.timedOut) {
|
|
throw new Error('Failed to load custom link chunk')
|
|
} else {
|
|
return null
|
|
}
|
|
}
|
|
|
|
const CustomLinkLoadable = Loadable({
|
|
loader: () =>
|
|
import(/* webpackChunkName: "custom-link" */ '@components/CustomLink/Link'),
|
|
loading: Loading,
|
|
delay: 0,
|
|
})
|