kentcdodds / mdx-bundler

🦤 Give me MDX/TSX strings and I'll give you back a component you can render. Supports imports!
MIT License
1.78k stars 75 forks source link

Error: Could not parse import/exports with acorn: SyntaxError: unexpected token [plugin @mdx-js/esbuild] #215

Open hai-x opened 1 year ago

hai-x commented 1 year ago

I want to write a normal text statement beginning with import in mdx, but it may be compiled into import JS statement.

And i get error

✘ [ERROR] Could not parse import/exports with acorn: SyntaxError: Unexpected token [plugin @mdx-js/esbuild]

What i write in mdx is like

## title1
import FOO 
## title2