Initial checklist
Affected package
@mdx-js/rollup@3.1.1
Steps to reproduce
https://github.com/joshpensky/mdx-js-rollup-vite-glob-repro
- Create a new Vite 7 project with
@mdx-js/rollup@3.1.1
- Define your
vite.config.ts file with the mdx plugin
- Create a few mdx files, then import with a raw query:
const docs = import.meta.glob("./docs/*.mdx", {
query: "?raw",
import: "default",
eager: true,
});
Actual behavior
The object values in the returned glob object are function components
Expected behavior
The object values should be the raw strings, which is typical behavior for the ?raw query param in Vite
Runtime
node@24.11.0
Package manager
pnpm@10.21.0
Operating system
macOS Sequoia 15.3.2
Build and bundle tools
Vite
Initial checklist
Affected package
@mdx-js/rollup@3.1.1
Steps to reproduce
https://github.com/joshpensky/mdx-js-rollup-vite-glob-repro
@mdx-js/rollup@3.1.1vite.config.tsfile with themdxpluginActual behavior
The object values in the returned glob object are function components
Expected behavior
The object values should be the raw strings, which is typical behavior for the
?rawquery param in ViteRuntime
node@24.11.0
Package manager
pnpm@10.21.0
Operating system
macOS Sequoia 15.3.2
Build and bundle tools
Vite