Hi team,
I was trying to setup Contentlayer to manage my posts content using the experimental app directory which now supports the static export.
The below config is required to support the export:
const nextConfig = {
...
output: "export",
}
And the Contentlayer uses redirect property to hook into the application.
As state by the Nextjs, that the redirect config is not required for the static export. The application is failing.
And, I cannot use the Contentlayer for static export.
Is there any workaround to this?
To reproduce
- Create a new Nextjs application and setup Contentlayer
- Setup the
next.config.js file to use Contentlayer config
- Set
output:"export" in your config
- Run the application
Hi team,
I was trying to setup Contentlayer to manage my posts content using the experimental
appdirectory which now supports the static export.The below config is required to support the export:
And the Contentlayer uses
redirectproperty to hook into the application.As state by the Nextjs, that the
redirectconfig is not required for the static export. The application is failing.And, I cannot use the Contentlayer for static export.
Is there any workaround to this?
To reproduce
next.config.jsfile to use Contentlayer configoutput:"export"in your config