Skip to content

Support *.md for Turbopack #78348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from
Open

Support *.md for Turbopack #78348

wants to merge 1 commit into from

Conversation

gaearon
Copy link
Contributor

@gaearon gaearon commented Apr 20, 2025

This is maybe not the right way to do it but I've wasted half an hour on this.

The docs here imply that .md extension will work with Turbopack but it absolutely does not without something like this.

Alternatively, the misleading docs need to change to not list .md extension at all.

I have not actually tested the PR, this is just a guess

@ijjk
Copy link
Member

ijjk commented Apr 20, 2025

Allow CI Workflow Run

  • approve CI run for commit: 41d51e0

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@wbinnssmith
Copy link
Member

wbinnssmith commented Apr 21, 2025

The docs here imply that .md extension will work with Turbopack but it absolutely does not without something like this.

Yeah, this is misleading. Right now it's impossible to configure @next/mdx with Turbopack to use anything but .mdx, and it's not even the default with webpack. The challenge with this particular change is that it makes Turbopack behave differently than webpack by default.

While with webpack you can configure extensions as a file path regex, we don't support that with Turbopack. We're working out a way to achieve a similar result while being backwards compatible. Should get back to you soon.

@wbinnssmith
Copy link
Member

@gaearon, I've got a PR to address this with #78563, let me know what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants