diff --git a/next.config.js b/next.config.js index 0519ecb..7c5a0fe 100644 --- a/next.config.js +++ b/next.config.js @@ -1 +1,18 @@ - \ No newline at end of file +/** @type {import('next').NextConfig} */ +const nextConfig = { + reactStrictMode: true, + swcMinify: true, + // Ensure external packages are handled correctly + transpilePackages: ['mermaid', 'katex'], + // Configure webpack if needed + webpack: (config) => { + // Handle mermaid.js + config.resolve.fallback = { + ...config.resolve.fallback, + fs: false, + }; + return config; + }, +} + +module.exports = nextConfig \ No newline at end of file diff --git a/src/app/wechat/page.tsx b/src/app/wechat/page.tsx index 4c5d6f0..1844332 100644 --- a/src/app/wechat/page.tsx +++ b/src/app/wechat/page.tsx @@ -1,10 +1,27 @@ -import WechatEditor from '@/components/editor/WechatEditor' +import dynamic from 'next/dynamic' +import { Suspense } from 'react' + +// Dynamically import WechatEditor with no SSR +const WechatEditor = dynamic(() => import('@/components/editor/WechatEditor'), { + ssr: false, + loading: () => ( +
+
Loading editor...
+
+ ), +}) export default function WechatPage() { return (
- + +
Loading editor...
+
+ }> + +
)