File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import dynamic from "next/dynamic" ;
2+
3+ const CopilotKitWrapperClient = dynamic (
4+ ( ) => import ( "./CopilotKitWrapper" ) ,
5+ { ssr : false }
6+ ) ;
7+
8+ export default CopilotKitWrapperClient ;
Original file line number Diff line number Diff line change 1+ const webpack = require ( 'webpack' )
12const withNextra = require ( 'nextra' ) ( {
23 theme : 'nextra-theme-docs' ,
34 themeConfig : './theme.config.jsx'
@@ -8,13 +9,27 @@ const isDev = process.env.NODE_ENV !== 'production'
89const basePath = isDev ? '' : '/docs'
910
1011module . exports = withNextra ( {
12+ transpilePackages : [
13+ '@copilotkitnext/react' ,
14+ '@copilotkit/react-core' ,
15+ 'streamdown' ,
16+ ] ,
1117 output : 'export' ,
1218 images : {
1319 unoptimized : true ,
1420 } ,
1521 basePath,
1622 assetPrefix : basePath ,
1723 trailingSlash : true ,
24+ webpack : ( config ) => {
25+ config . plugins . push (
26+ new webpack . IgnorePlugin ( {
27+ resourceRegExp : / k a t e x \. m i n \. c s s $ / ,
28+ contextRegExp : / n o d e _ m o d u l e s / ,
29+ } )
30+ )
31+ return config
32+ } ,
1833} )
1934
2035// If you have other Next.js configurations, you can pass them as the parameter above
Original file line number Diff line number Diff line change 11import " ../styles/custom.css" ;
2- import CopilotKitWrapper from " ../components/CopilotKitWrapper" ;
2+ import CopilotKitWrapper from " ../components/CopilotKitWrapperClient" ;
3+ import Head from " next/head" ;
34
45export default function MyApp({ Component , pageProps }) {
56 return (
6- <CopilotKitWrapper >
7- <Component { ... pageProps } />
8- </CopilotKitWrapper >
7+ <>
8+ <Head >
9+ <link
10+ rel = " stylesheet"
11+ href = " https://cdn.jsdelivr.net/npm/katex@0.16.28/dist/katex.min.css"
12+ crossOrigin = " anonymous"
13+ />
14+ </Head >
15+ <CopilotKitWrapper >
16+ <Component { ... pageProps } />
17+ </CopilotKitWrapper >
18+ </>
919 );
1020}
1121
You can’t perform that action at this time.
0 commit comments