Skip to content

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.

wbinnssmith added a commit that referenced this pull request May 1, 2025
Closes #78563 (replaces it)
Resolves #78348

This allows users the same flexibility they have with `@next/mdx` for webpack. It depends on #78733.

Test Plan: Included the integration test from #78563
@sokra sokra closed this in #78734 May 5, 2025
sokra pushed a commit that referenced this pull request May 5, 2025
Closes #78563 (replaces it)
Resolves #78348

This allows users the same flexibility they have with `@next/mdx` for webpack. It depends on #78733.

Test Plan: Included the integration test from #78563
eps1lon pushed a commit that referenced this pull request May 7, 2025
Closes #78563 (replaces it)
Resolves #78348

This allows users the same flexibility they have with `@next/mdx` for webpack. It depends on #78733.

Test Plan: Included the integration test from #78563
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants