mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #611] import.meta.glob (and dynamic MDX imports) not transformed in RSC build #131
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#131
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @keufcp on GitHub (Mar 20, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/611
Environment
Problem
In an App Router project with dynamic routes (e.g.
[year]/[month]/[day]/[slug]/page.tsx),MDX files cannot be loaded dynamically in the RSC build environment.
Attempt 1: Dynamic import with template literal
Error at runtime:
Attempt 2:
import.meta.globError at runtime:
import.meta.globis not being transformed by the RSC build pipeline (rolldown),and reaches the Workers runtime as-is, causing a runtime error.
Expected behavior
import.meta.globshould be statically transformed at build time in the RSC environment,as it is in standard Vite builds.
Workaround
None found. The nextra-docs-template example uses static imports only,
which is not viable for blog-style dynamic routing.
Notes
@mdx-js/rollupis configured correctly (auto-detected by vinext)that Vite normally applies to
import.meta.globdoes not occur there@keufcp commented on GitHub (Mar 22, 2026):
Thank you for the quick fix!