Files
better-auth/docs/next.config.mjs
Bereket Engida 4d79534d5f chore: formatting
2024-09-02 22:56:17 +03:00

59 lines
1.1 KiB
JavaScript

import createMDX from "fumadocs-mdx/config";
import { rehypeCodeDefaultOptions } from "fumadocs-core/mdx-plugins";
import { remarkInstall } from "fumadocs-docgen";
import { transformerTwoslash } from "fumadocs-twoslash";
import { JsxEmit, ModuleResolutionKind } from "typescript";
const withMDX = createMDX({
mdxOptions: {
rehypeCodeOptions: {
transformers: [
...rehypeCodeDefaultOptions.transformers,
transformerTwoslash({
twoslashOptions: {
compilerOptions: {
moduleResolution: ModuleResolutionKind.Bundler,
jsx: JsxEmit.React,
},
},
}),
],
},
remarkPlugins: [
[
remarkInstall,
{
persist: {
id: "persist-install",
},
},
],
],
},
});
/** @type {import('next').NextConfig} */
const config = {
reactStrictMode: true,
redirects() {
return [
{
source: "/docs",
destination: "/docs/introduction",
permanent: true,
},
];
},
images: {
remotePatterns: [
{
hostname: "images.unsplash.com",
},
{
hostname: "assets.aceternity.com",
},
],
},
};
export default withMDX(config);