code-hike / codehike

Marvellous code walkthroughs
https://codehike.org
MIT License
4.39k stars 135 forks source link

Support Dynamic Import ( next/dynamic ) #261

Closed nekochan0122 closed 1 year ago

nekochan0122 commented 1 year ago

image

Lib Version
@code-hike/mdx "0.7.3--canary.256.aefe40e.0"
next-mdx-remote "4.1.0"
typescript "4.7.4"
nekochan0122 commented 1 year ago

I use any to skip the type check, and It's said :

image

So I try to pass the CH.Code, and got the same error :

image

Still finding other solution🥲

pomber commented 1 year ago

The problem is: 'next/dynamic' is for components, and CH is not a component, it's an object. So, I think, what you are trying to do is not possible.

nekochan0122 commented 1 year ago

The problem is: 'next/dynamic' is for components, and CH is not a component, it's an object. So, I think, what you are trying to do is not possible.

Thx for reply 🥲