Files
shadcn-ui/apps/www/next.config.mjs
shadcn 650b3b9bda chore(www): switch to contentlayer2 (#4292)
* chore(www): switch to contentlayer2

* chore: rebuild registry

* fix: build
2024-07-15 12:18:58 +04:00

65 lines
1.4 KiB
JavaScript

import { createContentlayerPlugin } from "next-contentlayer2"
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
images: {
remotePatterns: [
{
protocol: "https",
hostname: "avatars.githubusercontent.com",
},
{
protocol: "https",
hostname: "images.unsplash.com",
},
],
},
redirects() {
return [
{
source: "/components",
destination: "/docs/components/accordion",
permanent: true,
},
{
source: "/docs/components",
destination: "/docs/components/accordion",
permanent: true,
},
{
source: "/examples",
destination: "/examples/mail",
permanent: false,
},
{
source: "/docs/primitives/:path*",
destination: "/docs/components/:path*",
permanent: true,
},
{
source: "/figma",
destination: "/docs/figma",
permanent: true,
},
{
source: "/docs/forms",
destination: "/docs/components/form",
permanent: false,
},
{
source: "/docs/forms/react-hook-form",
destination: "/docs/components/form",
permanent: false,
},
]
},
}
const withContentlayer = createContentlayerPlugin({
// Additional Contentlayer config options
})
export default withContentlayer(nextConfig)