Files
scriptc/docs/next.config.mjs
Chris Tate 8faad2f639 feat: add Node.js compatibility matrix (#284)
* feat: add Node.js compatibility matrix

- Add generated Node.js v24 compatibility inventory with static and dynamic support classifications.
- Publish the interactive /compatibility matrix and wire manifest generation into runtime and docs checks.

* fix: correct compatibility matrix generation

* fix: address PR 284 review findings

* fix: address PR 284 review findings

* test: exercise stream web loader through npm graph

* fix: correct dynamic global availability

* fix: keep compatibility module mappings precise
2026-09-02 16:03:36 -05:00

30 lines
1.1 KiB
JavaScript

import createMDX from "@next/mdx";
import { createRequire } from "node:module";
// Resolve the plugin to an absolute path (still a string, so the config
// stays serializable for Turbopack). A bare "remark-gfm" is require()d
// from the MDX loader's own package context, which under pnpm's strict
// module isolation cannot see this app's dependencies — production
// builds resolved it, the Turbopack dev server did not.
const require = createRequire(import.meta.url);
const withMDX = createMDX({
options: {
// GFM is what gives .mdx pages autolinks and strikethrough. Tables are
// authored as literal HTML per AGENTS.md, but the plugin stays so a
// stray pipe table degrades gracefully instead of rendering as a
// paragraph of pipes.
remarkPlugins: [[require.resolve("remark-gfm")]],
},
});
/** @type {import('next').NextConfig} */
const nextConfig = {
pageExtensions: ["ts", "tsx", "md", "mdx"],
// CI-style builds set NEXT_DIST_DIR so `pnpm check` never shares .next
// with a running dev server (a shared dist dir corrupts the dev cache).
distDir: process.env.NEXT_DIST_DIR || ".next",
};
export default withMDX(nextConfig);