Files
newsui/packages/docs/next.config.mjs
T

29 lines
680 B
JavaScript
Raw Normal View History

2026-05-19 21:09:56 +08:00
import createMDX from '@next/mdx';
import rehypePrettyCode from 'rehype-pretty-code';
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
basePath: process.env.NEXT_PUBLIC_BASE_PATH || '',
images: { unoptimized: true },
2026-05-19 21:09:56 +08:00
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
transpilePackages: ['@newspaperui/components', '@newspaperui/theme', '@newspaperui/utils'],
};
const withMDX = createMDX({
extension: /\.mdx?$/,
options: {
rehypePlugins: [
[
rehypePrettyCode,
{
theme: 'github-dark',
keepBackground: false,
},
],
],
},
});
export default withMDX(nextConfig);