Skip to content

Commit c002572

Browse files
committed
fix(dev): update remark-mdx-frontmatter
1 parent d458dc4 commit c002572

File tree

4 files changed

+34
-26
lines changed

4 files changed

+34
-26
lines changed

Diff for: docs/guides/mdx.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,7 @@ Clearly this is not a scalable solution for a blog with thousands of posts. Real
186186
If you wish to configure your own remark plugins you can do so through the `remix.config.js`'s `mdx` export:
187187

188188
```js filename=remix.config.js
189-
const {
190-
remarkMdxFrontmatter,
191-
} = require("remark-mdx-frontmatter");
189+
import remarkMdxFrontmatter from "remark-mdx-frontmatter";
192190

193191
// can be an sync / async function or an object
194192
exports.mdx = async (filename) => {

Diff for: packages/remix-dev/compiler/plugins/mdx.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { promises as fsp } from "node:fs";
22
import * as path from "node:path";
33
import type * as esbuild from "esbuild";
4-
import { remarkMdxFrontmatter } from "remark-mdx-frontmatter";
54

65
import { getLoaderForFile } from "../utils/loaders";
76
import { createMatchPath } from "../utils/tsconfig";
@@ -70,6 +69,7 @@ export async function processMDX(
7069
) {
7170
try {
7271
let fileContents = await fsp.readFile(absolutePath, "utf-8");
72+
let remarkMdxFrontmatter = (await import("remark-mdx-frontmatter")).default;
7373

7474
let rehypePlugins = [];
7575
let remarkPlugins: any[] = [

Diff for: packages/remix-dev/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"pretty-ms": "^7.0.1",
7070
"react-refresh": "^0.14.0",
7171
"remark-frontmatter": "4.0.1",
72-
"remark-mdx-frontmatter": "^1.0.1",
72+
"remark-mdx-frontmatter": "^5.1.0",
7373
"semver": "^7.3.7",
7474
"set-cookie-parser": "^2.6.0",
7575
"tar-fs": "^2.1.1",

Diff for: pnpm-lock.yaml

+31-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)