Files
medusa-store/www/api-reference/next.config.mjs
Kasper Fabricius Kristensen 3ad2136888 feat(api-reference): Add rewrite to UI docs (#4791)
* add rewrite to UI docs

* add base rewrite

---------

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-08-17 19:31:22 +03:00

40 lines
818 B
JavaScript

import mdx from "@next/mdx"
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverActions: true,
},
async rewrites() {
return {
fallback: [
{
source: "/ui",
destination: `${process.env.NEXT_PUBLIC_UI_URL}/ui`,
},
{
source: "/ui/:path*",
destination: `${process.env.NEXT_PUBLIC_UI_URL}/ui/:path*`,
},
{
source: "/:path*",
destination: `${process.env.NEXT_PUBLIC_DOCS_URL}/:path*`,
},
],
}
},
webpack: (config) => {
config.ignoreWarnings = [{ module: /node_modules\/keyv\/src\/index\.js/ }]
return config
},
}
const withMDX = mdx({
extension: /\.mdx?$/,
options: {
rehypePlugins: [],
},
})
export default withMDX(nextConfig)