react-code-dataset / next.js /crates /next-custom-transforms /tests /fixture /next-dynamic /with-options /output-dev.js
| import dynamic from 'next/dynamic'; | |
| const DynamicComponentWithCustomLoading = dynamic(()=>import('../components/hello'), { | |
| loadableGenerated: { | |
| modules: [ | |
| "src/some-file.js -> " + "../components/hello" | |
| ] | |
| }, | |
| loading: ()=><p>...</p> | |
| }); | |
| const DynamicClientOnlyComponent = dynamic(()=>import('../components/hello'), { | |
| loadableGenerated: { | |
| modules: [ | |
| "src/some-file.js -> " + "../components/hello" | |
| ] | |
| }, | |
| ssr: false | |
| }); | |
| const DynamicClientOnlyComponentWithSuspense = dynamic(()=>import('../components/hello'), { | |
| loadableGenerated: { | |
| modules: [ | |
| "src/some-file.js -> " + "../components/hello" | |
| ] | |
| }, | |
| ssr: false, | |
| suspense: true | |
| }); | |