Next.js Discord

Discord Forum

dynamic import dynamic variables

Unanswered
Asiatic Lion posted this in #help-forum
Open in Discord
Asiatic LionOP
This won't work
const from = 'next/link';
const Link = dynamic(() => import(from).then((mod) => mod), { ssr: false });


But if i change from to be next/link will work
const Link = dynamic(() => import('next/link').then((mod) => mod), { ssr: false });

0 Replies