@@ -789,8 +789,6 @@ Typically, `import` (or `export … from`) do not work here.
789
789
They can be compiled to dynamic ` import() ` by passing
790
790
[ ` options.useDynamicImport ` ] [ usedynamicimport ] .
791
791
792
- > ☢️ ** Danger** : you likely must set ` development: boolean ` .
793
-
794
792
###### ` file `
795
793
796
794
See [ ` compile ` ] [ compile ] .
@@ -814,7 +812,7 @@ exceptions:
814
812
###### ` options.Fragment `
815
813
816
814
These options are required: ` Fragment ` always, when ` development: true `
817
- then ` jsx ` and ` jsxs ` , when ` development: false ` then ` jsxDEV ` .
815
+ then ` jsxDEV ` , when ` development: false ` then ` jsx ` and ` jsxs ` .
818
816
They come from an automatic JSX runtime that you must import yourself.
819
817
820
818
<details >
@@ -823,11 +821,7 @@ They come from an automatic JSX runtime that you must import yourself.
823
821
``` tsx
824
822
import * as runtime from ' react/jsx-runtime'
825
823
826
- const {default : Content} = await evaluate (' # hi' , {
827
- development: false ,
828
- ... otherOptions ,
829
- ... runtime
830
- })
824
+ const {default : Content} = await evaluate (' # hi' , {... otherOptions , ... runtime })
831
825
```
832
826
833
827
</details >
@@ -844,7 +838,6 @@ import * as provider from '@mdx-js/react'
844
838
import * as runtime from ' react/jsx-runtime'
845
839
846
840
const {default : Content} = await evaluate (' # hi' , {
847
- development: false ,
848
841
... otherOptions ,
849
842
... provider ,
850
843
... runtime
@@ -868,7 +861,7 @@ Assuming the contents of `example.mdx` from [§ Use][use] was in `file`, then:
868
861
import * as runtime from ' react/jsx-runtime'
869
862
import {evaluate } from ' @mdx-js/mdx'
870
863
871
- console .log (await evaluate (file , { ... runtime , development: false } ))
864
+ console .log (await evaluate (file , runtime ))
872
865
```
873
866
874
867
…yields:
@@ -930,10 +923,7 @@ On the server:
930
923
``` tsx
931
924
import {compile } from ' @mdx-js/mdx'
932
925
933
- const code = String (await compile (' # hi' , {
934
- development: false ,
935
- outputFormat: ' function-body'
936
- }))
926
+ const code = String (await compile (' # hi' , {outputFormat: ' function-body' }))
937
927
// To do: send `code` to the client somehow.
938
928
```
939
929
1 commit comments
vercel[bot] commentedon Oct 18, 2023
Successfully deployed to the following URLs:
mdx – ./
mdxjs.com
mdx-git-main-mdx.vercel.app
mdx-mdx.vercel.app
v2.mdxjs.com