Files
medusa-store/www/apps/api-reference/next.config.mjs
Shahed Nasser 761d2e7a69 docs: update documentation websites (#5882)
* docs: update next.js to 14.0.4

* update docusaurus to v3.0.1

* update packages dependencies

* added engines

* update lock
2023-12-14 20:43:16 +02:00

44 lines
974 B
JavaScript

import mdx from "@next/mdx"
import bundleAnalyzer from "@next/bundle-analyzer"
/** @type {import('next').NextConfig} */
const nextConfig = {
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
},
transpilePackages: ["docs-ui"],
}
const withMDX = mdx({
extension: /\.mdx?$/,
options: {
rehypePlugins: [],
},
})
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE_BUNDLE === "true",
})
export default withBundleAnalyzer(withMDX(nextConfig))