-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
222 additions
and
46 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
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.