Files
medusa-store/www/apps/api-reference/next.config.mjs
Shahed Nasser 522d3ce764 docs: improvements to API reference intro sections (#9397)
- Improve intro sections of API reference to utilize divided columns
- Improve the content of the intro sections
- Add a new Workflows section to explain the workflows badge and how to use it
- Fixes to headings and add anchor for copying the link to a section
- Fixes responsiveness of intro sections on mobile devices
- Other: fix loading not showing when a sidebar category is opened.

Closes DOCS-932, DOCS-934, DOCS-937

Preview: https://api-reference-v2-git-docs-api-ref-intro-fixes-medusajs.vercel.app/v2/api/store
2024-10-06 16:51:08 +00:00

38 lines
878 B
JavaScript

import mdx from "@next/mdx"
import bundleAnalyzer from "@next/bundle-analyzer"
import rehypeMdxCodeProps from "rehype-mdx-code-props"
import rehypeSlug from "rehype-slug"
/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: process.env.NEXT_PUBLIC_BASE_PATH || "/v2/api",
webpack: (config) => {
config.ignoreWarnings = [{ module: /node_modules\/keyv\/src\/index\.js/ }]
return config
},
transpilePackages: ["docs-ui"],
}
const withMDX = mdx({
extension: /\.mdx?$/,
options: {
rehypePlugins: [
[
rehypeMdxCodeProps,
{
tagName: "code",
},
],
[rehypeSlug],
],
development: process.env.NODE_ENV === "development",
},
})
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE_BUNDLE === "true",
})
export default withBundleAnalyzer(withMDX(nextConfig))