mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 10:25:06 +03:00
56 lines
1.3 KiB
JavaScript
56 lines
1.3 KiB
JavaScript
import nextMdx from '@next/mdx'
|
|
import remarkGfm from 'remark-gfm'
|
|
import rehypeSlug from 'rehype-slug'
|
|
|
|
import withTM from 'next-transpile-modules'
|
|
|
|
const withMDX = nextMdx({
|
|
extension: /\.mdx?$/,
|
|
options: {
|
|
remarkPlugins: [remarkGfm],
|
|
rehypePlugins: [rehypeSlug],
|
|
// This is required for `MDXProvider` component
|
|
// providerImportSource: '@mdx-js/react',
|
|
},
|
|
})
|
|
|
|
// /** @type {NextConfig} */
|
|
const nextConfig = {
|
|
// Append the default value with md extensions
|
|
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
|
|
reactStrictMode: true,
|
|
swcMinify: true,
|
|
basePath: '/docs',
|
|
images: {
|
|
dangerouslyAllowSVG: true,
|
|
domains: ['avatars.githubusercontent.com', 'github.com', 'user-images.githubusercontent.com'],
|
|
},
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: '/:path*',
|
|
headers: [
|
|
{
|
|
key: 'Strict-Transport-Security',
|
|
value: '',
|
|
},
|
|
{
|
|
key: 'X-Robots-Tag',
|
|
value: 'all',
|
|
},
|
|
{
|
|
key: 'X-Frame-Options',
|
|
value: 'DENY',
|
|
},
|
|
],
|
|
},
|
|
]
|
|
},
|
|
}
|
|
|
|
// next.config.js
|
|
export default () => {
|
|
const plugins = [withMDX, withTM(['ui', 'common'])]
|
|
return plugins.reduce((acc, next) => next(acc), nextConfig)
|
|
}
|