#MDX bundler now supports MDX v2

1 messages · Page 1 of 1 (latest)

wary axle
#

Hi @round oar

#

one question on MDX bundler

#

if you can help with

#

if i make a change in mdx post, it will rerender the whole post web page on server side on each request?

#

i am comparing it to normal MDX engine of nextJS which is currently generating static pages of each post at build time

#

so it can super fast

round oar
#

It depends on how you use getStaticProps and getStaticPaths, could be staticly generated as well with mdx-bundler.

wary axle
#

humm

#

my only worry is if i make it dynamic(all mdx posts in database) then all rerendering would be done at each request on server

#

which will be very slow and not scalable

round oar
wary axle
#

but i am azure docker containers to serve

#

not vercel

#

if the feature is specific to vercel, then can't use it

round oar
#

It's not a vercel feature.

wary axle
#

gr8

round oar
#

If you set paths to include all the routes, revalidate to infinite, fallback to blocking, that basically replicates the build time cache behavior you're looking for.

#

As a bonus, with fallback: "blocking" any new blog you have in your database would render at request, then cached, without having to recompile.

wary axle
#

wow

#

amazing

round oar
#

if you might update your blogs frequently, then you might want to reduce the revalidate time.

wary axle
#

gr8

#

so its something better than normal MDX as well as MDX-remote

#

right

#

?

round oar
#

Personally I used next-mdx-remote, since that's more purposefully built for Next.

#

They have slightly different behavior, but either should work.

wary axle
#

i can achieve above in MDX-remote as well?

round oar
#

yes. I haven't compared them recently, but remote might be a bit better for the build caching.

wary axle
#

gr8

#

let me check more