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

Vue Router calls generated MDXContent function without props parameter, causing TypeError #82

Closed mike-mcdonald closed 3 years ago

mike-mcdonald commented 3 years ago

Initial checklist

Affected packages and versions: xdm@2.0.2

Steps to reproduce

  1. Download linked example (I spent too much time trying to get it running directly and gave up, sorry)
  2. Run npm install or yarn install
  3. Start app: npm run serve and open browser to 'localhost:8080'
  4. Open web console
  5. Note errors in the console pointing to trying to access components property on undefined

Link to code example: https://codesandbox.io/s/dank-tree-b1ubs

Expected behavior

Should see output of Page.mdx underneath Vue logo

Actual behavior

The content of Page.mdx is not shown. Error:

vue-router.esm-bundler.js?6c02:3264 TypeError: Cannot read properties of undefined (reading 'components')
    at MDXContent ...

Notes