Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix resolve base in esbuild loader #1854

Merged
merged 3 commits into from Dec 30, 2021
Merged

Fix resolve base in esbuild loader #1854

merged 3 commits into from Dec 30, 2021

Conversation

wooorm
Copy link
Member

@wooorm wooorm commented Dec 4, 2021

Closes GH-1821.
Related-to: wooorm/xdm@db74ddc

@vercel
Copy link

vercel bot commented Dec 4, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mdx/mdx/3oQWbHXM47W2rPQu5Xb5h1NzYTga
✅ Preview: https://mdx-git-esbuild-resolve-mdx.vercel.app

@codecov-commenter

This comment has been minimized.

@vercel vercel bot temporarily deployed to Preview December 4, 2021 10:28 Inactive
@@ -13,7 +13,9 @@
* @typedef {ProcessorOptions & {allowDangerousRemoteMdx?: boolean}} Options
*/

import assert from 'node:assert'
import {promises as fs} from 'fs'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense for fs to also have a node: prefix?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I’ll remove the node: prefixes.
There was some reason why I didn’t apply them here (they are in xdm). Perhaps due to CRA or Next or so?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, it’s a bit inconsistent now anyway. I’ve made it more consistent. esbuild and the node loader probably run in a Node version that support it. I’ve “downgraded” one instance of MDX core though.

@vercel vercel bot temporarily deployed to Preview December 30, 2021 17:30 Inactive
@wooorm wooorm added 🐛 type/bug This is a problem 👶 semver/patch This is a backwards-compatible fix 🗄 area/interface This affects the public interface labels Dec 30, 2021
@wooorm wooorm merged commit 5c61f57 into main Dec 30, 2021
@wooorm wooorm deleted the esbuild-resolve branch December 30, 2021 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗄 area/interface This affects the public interface 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem
Development

Successfully merging this pull request may close these issues.

@mdx-js/esbuild not resolving relative paths
3 participants