Skip to content
Discussion options

You must be logged in to vote

Does it have support for namespace imports like -> import * as R from "react" ?

👍🏻 Yes it does!

// Namespace import
import * as R from 'react';
const Heavy = R.lazy(() => import('./Heavy'));

// Next.js dynamic
import dynamic from 'next/dynamic';
const Heavy = dynamic(() => import('./Heavy'));

// loadable-components
import loadable from '@loadable/component';
const Heavy = loadable(() => import('./Heavy'));

Note: For now, you need to reference lazy/dynamic/loadable directly in your code (no custom wrappers or re-exports yet). We’re working on making this more flexible.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by segovskyestelar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants