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

feat(minor): support node: import in older node versions #460

Merged
merged 1 commit into from Nov 20, 2021
Merged

feat(minor): support node: import in older node versions #460

merged 1 commit into from Nov 20, 2021

Conversation

privatenumber
Copy link
Contributor

Problem

Bundling a dependency with import fs from 'node:fs' didn't work with Node v12 because it would convert the import statement to a require, which requires Node v14.18.0.

Changes

  • Add a simple esbuild plugin to strip the node: protocol
  • Remove the disabled option in externalPlugin in favor of not passing it into esbuild in the first place. Minor performance nitpick since I didn't want to have two different ways of disabling plugins.

@vercel
Copy link

vercel bot commented Nov 20, 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/egoist/tsup/Fo7kSh9BkouZpEP9zEhJa5ZXwteV
✅ Preview: https://tsup-git-fork-privatenumber-support-node-protocol-egoist.vercel.app

@egoist egoist changed the title feat: support node protocol feat(minor): support node: import in older node versions Nov 20, 2021
@egoist egoist merged commit c78ea9c into egoist:master Nov 20, 2021
@github-actions
Copy link

🎉 This PR is included in version 5.7.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants