Skip to content

Commit 06f6f25

Browse files
committed
run patch-package before build because of cloudflare
1 parent 1e6852c commit 06f6f25

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"res:watch": "rescript watch",
1515
"res:clean": "rescript clean",
1616
"res:build": "rescript build",
17-
"build": "rescript build && react-router build",
17+
"build": "patch-package && rescript build && react-router build",
1818
"test": "node scripts/test-examples.mjs && node scripts/test-hrefs.mjs",
1919
"reanalyze": "reanalyze -all-cmt .",
2020
"update-index": "npm run generate-llms && && node scripts/generate_feed.mjs > public/blog/feed.xml",

src/Mdx.res

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,12 @@ let remarkReScriptPrelude = tree => {
129129
let remarkLinkPlugin = (tree, vfile) => {
130130
visit(tree, "link", node => {
131131
let url = node["url"]
132-
let filePath = switch vfile["history"][0] {
133-
| Some(path) => path
134-
| None => {
135-
Console.error2("File path not found for vfile:", JSON.stringifyAny(node["url"]))
136-
""
137-
}
138-
}
132+
let filePath =
133+
vfile["history"][0]->Option.getOrThrow(
134+
~message=`File path not found for vfile: ${JSON.stringifyAny(vfile)->Option.getOr(
135+
"unknown vfile",
136+
)}`,
137+
)
139138

140139
// Direct links to the homepage are OK
141140
if url == "https://rescript-lang.org" {

0 commit comments

Comments
 (0)