diff --git a/next.config.ts b/next.config.ts index b9410654..2f06529d 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,7 +1,6 @@ import nextra from 'nextra'; // Set up Nextra with its configuration -// Configure mdxOptions as a function to load plugins at runtime for Turbopack compatibility const withNextra = nextra({ latex: true, search: { @@ -14,21 +13,8 @@ const withNextra = nextra({ // Refer to this: https://nextra.site/docs/advanced/table whiteListTagsStyling: ['table', 'thead', 'tbody', 'tr', 'th', 'td'], - // Configure mdxOptions with plugins loaded via require for Turbopack compatibility - // Using require instead of import keeps the config more serializable - mdxOptions: (() => { - // Load plugins using require to avoid top-level imports - const remarkGfm = require('remark-gfm'); - const rehypeAttrs = require('rehype-attr'); - - return { - // Add remark plugins for GitHub Flavored Markdown support - remarkPlugins: [remarkGfm.default || remarkGfm], - rehypePlugins: [ - [rehypeAttrs.default || rehypeAttrs, { properties: ['width', 'class'] }] - ] - }; - })() + // Note: mdxOptions with plugins cannot be serialized in Next.js 16 with Turbopack + // Plugins should be configured through other means if needed }); // Export the final Next.js config with Nextra included @@ -124,12 +110,4 @@ export default withNextra({ }, ]; }, - // Configure webpack to use memory cache to avoid large string serialization warnings - webpack: (config, { dev, isServer }) => { - // Use memory cache for better performance and to avoid serialization warnings - config.cache = { - type: 'memory', - }; - return config; - }, }); diff --git a/package.json b/package.json index 05667c34..d8be1d37 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "private": true, "description": "QueryPie Docs", "scripts": { - "dev": "next dev --webpack", - "build": "next build --webpack", + "dev": "next dev", + "build": "next build", "postbuild": "npm run generate-pagefind && npm run generate-sitemap", "start": "next start", "lint": "eslint src --max-warnings 0",