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

refactor(remix-dev): replace @esbuild-plugins/node-modules-polyfill with esbuild-plugin-polyfill-node #5274

Conversation

MichaelDeBoey
Copy link
Member

@MichaelDeBoey MichaelDeBoey commented Jan 26, 2023

As mentioned by @remorses (the maintainer of @esbuild-plugins/node-modules-polyfill in remorses/esbuild-plugins#29 (comment), we should use esbuild-plugin-polyfill-node instead

This will also remove some deprecation warnings when installing @remix-run/dev & fixes some imports of built-in Node packages


Closes #4299

@MichaelDeBoey MichaelDeBoey added the dependencies Pull requests that update a dependency file label Jan 26, 2023
@changeset-bot
Copy link

changeset-bot bot commented Jan 26, 2023

⚠️ No Changeset found

Latest commit: b5ab62b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@MichaelDeBoey MichaelDeBoey force-pushed the update-esbuild-plugins-node-modules-polyfill-package branch from d4c4b11 to 698ed2a Compare January 28, 2023 14:58
@MichaelDeBoey MichaelDeBoey force-pushed the update-esbuild-plugins-node-modules-polyfill-package branch from 698ed2a to 5317907 Compare March 5, 2023 20:27
@MichaelDeBoey MichaelDeBoey force-pushed the update-esbuild-plugins-node-modules-polyfill-package branch from 5317907 to 318dcc3 Compare March 15, 2023 02:54
@MichaelDeBoey MichaelDeBoey added the javascript Pull requests that update Javascript code label Mar 15, 2023
@MichaelDeBoey MichaelDeBoey force-pushed the update-esbuild-plugins-node-modules-polyfill-package branch 4 times, most recently from a04419e to 4495004 Compare March 20, 2023 19:15
@MichaelDeBoey MichaelDeBoey force-pushed the update-esbuild-plugins-node-modules-polyfill-package branch 2 times, most recently from 6535ba8 to 2b8d3df Compare March 25, 2023 17:02
@nkrmr
Copy link

nkrmr commented Mar 28, 2023

Hello @MichaelDeBoey ,

Do you know when this PR will be merged?
It's a sticking point for me.

Best regards

@MichaelDeBoey
Copy link
Member Author

@nkrmr node: protocol imports are now supported by #5773 (instead of #5222)

@pcattori We do need this PR in order to close #4299 though

Since we have to wait for remorses/esbuild-plugins#29 to be merged before we can continue, I'll make this a draft

@MichaelDeBoey MichaelDeBoey marked this pull request as draft March 29, 2023 17:31
@MichaelDeBoey MichaelDeBoey force-pushed the update-esbuild-plugins-node-modules-polyfill-package branch 4 times, most recently from 280b031 to 455abd5 Compare March 31, 2023 23:30
@MichaelDeBoey MichaelDeBoey force-pushed the update-esbuild-plugins-node-modules-polyfill-package branch 2 times, most recently from da6285c to 909356f Compare April 10, 2023 17:27
@MichaelDeBoey MichaelDeBoey changed the title chore(remix-dev): update @esbuild-plugins/node-modules-polyfill package refactor(remix-dev): replace @esbuild-plugins/node-modules-polyfill with esbuild-plugin-polyfill-node Apr 10, 2023
@MichaelDeBoey MichaelDeBoey marked this pull request as ready for review April 10, 2023 17:30
@MichaelDeBoey MichaelDeBoey force-pushed the update-esbuild-plugins-node-modules-polyfill-package branch from 909356f to b5ab62b Compare April 13, 2023 20:04
@jacob-ebey jacob-ebey merged commit 8e44e7c into remix-run:dev Apr 13, 2023
@jacob-ebey
Copy link
Member

Thanks @MichaelDeBoey

@MichaelDeBoey MichaelDeBoey deleted the update-esbuild-plugins-node-modules-polyfill-package branch April 14, 2023 00:27
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-987ee78-20230414 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@TrySound
Copy link
Contributor

TrySound commented May 6, 2023

@MichaelDeBoey still not good replacement
our cloudflare bundle grew up by 45kB!
All because of unnecessary added global polyfills

image

@MichaelDeBoey
Copy link
Member Author

@TrySound If you can come up with a better solution here, we're happy to accept PRs! 🙏

petebacondarwin pushed a commit to MichaelDeBoey/workers-sdk that referenced this pull request Mar 8, 2024
Replaces `@esbuild-plugins/node-globals-polyfill` & `@esbuild-plugins/node-modules-polyfill` with the up-to-date & maintained `esbuild-plugins-node-modules-polyfill`

The `esbuild-plugins` repository actually points towards using `esbuild-plugin-polyfill-node` instead
https://github.com/remorses/esbuild-plugins/blob/373b44902ad3e669f7359c857de09a930ce1ce90/README.md?plain=1#L15-L16

But the Remix repo (see remix-run/remix#5274) tried this and found some regressions.
So they chose to go for @imranbarbhuiya's  `esbuild-plugins-node-modules-polyfill` instead (see remix-run/remix#6562), which is an up-to-date and well maintained alternative.

Users should no longer see the following deprecation warnings when installing Wrangler:

```sh
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
```

Resolves cloudflare#1232
petebacondarwin pushed a commit to MichaelDeBoey/workers-sdk that referenced this pull request Mar 8, 2024
Replaces `@esbuild-plugins/node-globals-polyfill` & `@esbuild-plugins/node-modules-polyfill` with the up-to-date & maintained `esbuild-plugins-node-modules-polyfill`

The `esbuild-plugins` repository actually points towards using `esbuild-plugin-polyfill-node` instead
https://github.com/remorses/esbuild-plugins/blob/373b44902ad3e669f7359c857de09a930ce1ce90/README.md?plain=1#L15-L16

But the Remix repo (see remix-run/remix#5274) tried this and found some regressions.
So they chose to go for @imranbarbhuiya's  `esbuild-plugins-node-modules-polyfill` instead (see remix-run/remix#6562), which is an up-to-date and well maintained alternative.

Users should no longer see the following deprecation warnings when installing Wrangler:

```sh
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
```

Resolves cloudflare#1232
petebacondarwin pushed a commit to MichaelDeBoey/workers-sdk that referenced this pull request Mar 8, 2024
Replaces `@esbuild-plugins/node-globals-polyfill` & `@esbuild-plugins/node-modules-polyfill` with the up-to-date & maintained `esbuild-plugins-node-modules-polyfill`

The `esbuild-plugins` repository actually points towards using `esbuild-plugin-polyfill-node` instead
https://github.com/remorses/esbuild-plugins/blob/373b44902ad3e669f7359c857de09a930ce1ce90/README.md?plain=1#L15-L16

But the Remix repo (see remix-run/remix#5274) tried this and found some regressions.
So they chose to go for @imranbarbhuiya's  `esbuild-plugins-node-modules-polyfill` instead (see remix-run/remix#6562), which is an up-to-date and well maintained alternative.

Users should no longer see the following deprecation warnings when installing Wrangler:

```sh
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
```

Resolves cloudflare#1232
petebacondarwin pushed a commit to cloudflare/workers-sdk that referenced this pull request Mar 9, 2024
Replaces `@esbuild-plugins/node-globals-polyfill` & `@esbuild-plugins/node-modules-polyfill` with the up-to-date & maintained `esbuild-plugins-node-modules-polyfill`

The `esbuild-plugins` repository actually points towards using `esbuild-plugin-polyfill-node` instead
https://github.com/remorses/esbuild-plugins/blob/373b44902ad3e669f7359c857de09a930ce1ce90/README.md?plain=1#L15-L16

But the Remix repo (see remix-run/remix#5274) tried this and found some regressions.
So they chose to go for @imranbarbhuiya's  `esbuild-plugins-node-modules-polyfill` instead (see remix-run/remix#6562), which is an up-to-date and well maintained alternative.

Users should no longer see the following deprecation warnings when installing Wrangler:

```sh
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
```

Resolves #1232
petebacondarwin pushed a commit to MichaelDeBoey/workers-sdk that referenced this pull request Mar 13, 2024
Replaces `@esbuild-plugins/node-globals-polyfill` & `@esbuild-plugins/node-modules-polyfill` with the up-to-date & maintained `esbuild-plugins-node-modules-polyfill`

The `esbuild-plugins` repository actually points towards using `esbuild-plugin-polyfill-node` instead
https://github.com/remorses/esbuild-plugins/blob/373b44902ad3e669f7359c857de09a930ce1ce90/README.md?plain=1#L15-L16

But the Remix repo (see remix-run/remix#5274) tried this and found some regressions.
So they chose to go for @imranbarbhuiya's  `esbuild-plugins-node-modules-polyfill` instead (see remix-run/remix#6562), which is an up-to-date and well maintained alternative.

Users should no longer see the following deprecation warnings when installing Wrangler:

```sh
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
```

Resolves cloudflare#1232
petebacondarwin pushed a commit to MichaelDeBoey/workers-sdk that referenced this pull request Mar 16, 2024
Replaces `@esbuild-plugins/node-globals-polyfill` & `@esbuild-plugins/node-modules-polyfill` with the up-to-date & maintained `esbuild-plugins-node-modules-polyfill`

The `esbuild-plugins` repository actually points towards using `esbuild-plugin-polyfill-node` instead
https://github.com/remorses/esbuild-plugins/blob/373b44902ad3e669f7359c857de09a930ce1ce90/README.md?plain=1#L15-L16

But the Remix repo (see remix-run/remix#5274) tried this and found some regressions.
So they chose to go for @imranbarbhuiya's  `esbuild-plugins-node-modules-polyfill` instead (see remix-run/remix#6562), which is an up-to-date and well maintained alternative.

Users should no longer see the following deprecation warnings when installing Wrangler:

```sh
npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
npm WARN deprecated [email protected]: Please use @jridgewell/sourcemap-codec instead
```

Resolves cloudflare#1232
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants