diff --git a/docs/docs/getting-started.server.mdx b/docs/docs/getting-started.server.mdx index 695b359bc..cdd87567d 100644 --- a/docs/docs/getting-started.server.mdx +++ b/docs/docs/getting-started.server.mdx @@ -358,6 +358,22 @@ If you use more modern JavaScript features than what your users support, Make sure `rollup@3` is not installed. + + **Note**: If you also use `vitejs/vite-plugin-react`, you need to force + `@mdx-js/rollup` to run in the `pre` phase before it: + + ```js path="vite.config.js" + // … + export default defineConfig({ + plugins: [ + {enforce: 'pre', ...mdx(/* jsxImportSource: …, otherOptions… */)}, + react() + ] + }) + // … + ``` + + See also [¶ Rollup][rollup], which is used in Vite, and see [¶ Vue][vue], if you’re using that, for more info.