Haven’t tried to do that, so not sure. Using next/dynamic might lead to one additional JS bundle.
Also, if you want multiple entrypoints (like pages/index.js and pages/account.js) you’d need to remember to do the dynamic import in each file separately.
If you import the component with next/dynamic you have an option which you can pass in {ssr: false }
Yes, that is useful.
next/dynamic
also allows you to send a smaller initial JavaScript bundle to the browser, which is great for performance!What's the difference between this method and simply importing my main App component with next/dynamic and passing {ssr: false}?
Haven’t tried to do that, so not sure. Using
next/dynamic
might lead to one additional JS bundle.Also, if you want multiple entrypoints (like
pages/index.js
andpages/account.js
) you’d need to remember to do the dynamic import in each file separately.I tried using
next/dynamic
, and I am still getting the same errors I am getting in production. Thewindow
error.