Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

fix: add better redirects for shadcn cli install

Dillion Verma6eed22c972c9
diff --git a/next.config.mjs b/next.config.mjs
index a794021a..1aa47e85 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -34,9 +34,26 @@ const nextConfig = {
permanent: true,
},
{
- source: "/r/:name",
+ source: "/r",
+ destination: "/r/index.json",
+ permanent: true,
+ },
+ {
+ source: "/r/index",
+ destination: "/r/index.json",
+ permanent: true,
+ },
+ {
+ source: "/r/:name((?!index\\.json|styles/default/).*)",
destination: "/r/styles/default/:name.json",
permanent: true,
+ missing: [
+ {
+ type: "query",
+ key: "_redirected",
+ value: undefined,
+ },
+ ],
},
];
},