forked from vercel/turborepo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable mdx parsing in turbotrace (vercel#3304)
It's not necessary to enable `MDX` parsing in turbotrace, and there was a parsing error that caused the build to fail when I was trying to enable turbotrace in `verce/site`: https://vercel.com/vercel/vercel-site/7pFWUVMWVAv3jC44WD2nBnwrbJpM Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
a296a24
commit 9fd35e4
Showing
10 changed files
with
233 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
10 changes: 10 additions & 0 deletions
10
crates/turbopack/tests/node-file-trace/integration/mdx/example.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import {Chart} from './snowfall.jsx' | ||
export const year = 2018 | ||
|
||
# Last year’s snowfall | ||
|
||
In {year}, the snowfall was above average. | ||
It was followed by a warm spring which caused | ||
flood conditions in many of the nearby rivers. | ||
|
||
<Chart year={year} color="#fcb32c" /> |
14 changes: 14 additions & 0 deletions
14
crates/turbopack/tests/node-file-trace/integration/mdx/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const moduleAlias = require("module-alias"); | ||
const os = require("os"); | ||
|
||
require("./empty"); | ||
|
||
moduleAlias.addAlias("./example.mdx", __dirname + "/empty.js"); | ||
|
||
const Example = require("./example.mdx"); | ||
|
||
const { existsSync } = eval("require")("fs"); | ||
|
||
if (__dirname.startsWith(os.tmpdir()) && existsSync("./snowfall.jsx")) { | ||
throw new Error("snowfall.jsx should not exist"); | ||
} |
7 changes: 7 additions & 0 deletions
7
crates/turbopack/tests/node-file-trace/integration/mdx/snowfall.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export function Chart({ year, color }) { | ||
return ( | ||
<div> | ||
{year} - {color} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.