I am trying to import a component onto a page and the component uses a package that uses the window property. So, I need to dynamically import the component.
How can I do the following with Gatsby? (This is in NextJS)
import dynamic from 'next/dynamic';
...
const MyComponent = dynamic(() =>
import('path').then((comp) => comp.default),
);