storybook: [Bug]: addon-docs - mdx-react-shim.js - does not provide an export named 'useMDXComponents'

Describe the bug

After succesfully install latest storybook on Vuetify (Vue3) project I see this on MDX “Configure your project” site:

Captura de pantalla 2023-11-09 a las 19 28 17

Thanks!

To Reproduce

No response

System

yarn dlx storybook@latest init

Additional context

No response

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 7
  • Comments: 15 (2 by maintainers)

Most upvoted comments

extensions: ['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']

The important part here is .mjs needs to come before .js

Otherwise it resolves the commonjs file in the same folder.

@Integrayshaun is this something you can fix in your sample project?

It works if you exclude the extension option from vite.config.ts. But I don’t know why.

// vite.config.ts
...
  define: { 'process.env': {} },
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url)),
    },
    // extensions: ['.js', '.json', '.jsx', '.mjs', '.ts', '.tsx', '.vue'],
  },
  server: {
    port: 3000,
  },
...

#25013

Same here, and the v-application-wrapper is way too big if let with autoDoc