-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
and apply mdx-bundler patch (see kentcdodds/mdx-bundler#206)
- Loading branch information
1 parent
f758096
commit 93acaca
Showing
4 changed files
with
39 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,10 +27,8 @@ | |
"pnpm": "^7.11.0" | ||
}, | ||
"pnpm": { | ||
"updateConfig": { | ||
"ignoreDependencies": [ | ||
"esbuild" | ||
] | ||
"patchedDependencies": { | ||
"[email protected]": "patches/[email protected]" | ||
} | ||
} | ||
} |
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,26 @@ | ||
diff --git a/dist/index.js b/dist/index.js | ||
index 4161f623ba48d04a69ed5358a45a04751f3b9eb1..03b43f76d48b8bd7624a35ea599ce3f6f604bf5e 100644 | ||
--- a/dist/index.js | ||
+++ b/dist/index.js | ||
@@ -173,15 +173,18 @@ async function bundleMDX({ | ||
}); | ||
} | ||
}; | ||
+ /** @type import('esbuild').BuildOptions["define"] */ | ||
+ const define = {} | ||
+ if (process.env.NODE_ENV !== undefined) { | ||
+ define['process.env.NODE_ENV'] = JSON.stringify(process.env.NODE_ENV) | ||
+ } | ||
const buildOptions = esbuildOptions({ | ||
entryPoints: [entryPath], | ||
write: isWriting, | ||
outdir: isWriting ? bundleDirectory : undefined, | ||
publicPath: isWriting ? bundlePath : undefined, | ||
absWorkingDir: cwd, | ||
- define: { | ||
- 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) | ||
- }, | ||
+ define, | ||
plugins: [(0, _esbuildPluginGlobalExternals.globalExternals)({ | ||
...globals, | ||
react: { |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
93acaca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
pkerschbaum-homepage – ./
pkerschbaum-homepage-pkerschbaum.vercel.app
pkerschbaum-homepage-git-main-pkerschbaum.vercel.app
www.pkerschbaum.com
pkerschbaum.com