wooorm / xdm

Just a *really* good MDX compiler. No runtime. With esbuild, Rollup, and webpack plugins
http://wooorm.com/xdm/
MIT License
595 stars 18 forks source link

Add `useDynamicImport` option, stable `baseUrl` #30

Closed wooorm closed 3 years ago

wooorm commented 3 years ago

View rendered readme

Split previously experimental into two stable options:

This additionally fixes two bugs in the 'function-body' output format:

Closes GH-23. Related-to GH-26.

/cc @lunelson

wooorm commented 3 years ago

If someone has a better name for useDynamicImport, I’m all ears.

My previous ideas of outputType: 'script' | 'module' or importStatements: false: not too happy with them either. For the first, it doesn’t make sense to output a script with outputFormat: 'program'. For the second: it’s too vague and this functionality also affects export … from.