Skip to content
Dashboard

Next 3.0 Preview: Static Exports and Dynamic Imports

export default () => (
<p>Welcome to my React App!</p>
)

Link to headingNext-Export

Link to headingHow to Use

next.config.js
exports.exportPathMap = () => ({
"/": { page: "/" },
"/about": { page: "/about" },
"/p/hello-nextjs": { page: "/post", query: { title: "hello-nextjs" } },
"/p/learn-nextjs": { page: "/post", query: { title: "learn-nextjs" } },
"/p/deploy-nextjs": { page: "/post", query: { title: "deploy-nextjs" } }
})

next build
next export

{
"scripts": {
"build": "next build && next export"
}
}

npm run build

vercel

Link to headingKnown Limitations

Link to headingDynamic Imports

import dynamic from 'next/dynamic'
const DynamicComponent1 = dynamic(import('@components/hello1'))
const DynamicComponent2 = dynamic(import('@components/hello2'))
export default () => (
<div>
<Header />
<DynamicComponent />
<p>HOME PAGE is here!</p>
</div>
)

Link to headingServer Side Rendering

Link to headingGet it Now!

Ready to deploy?