Skip to content

feat: support process and Buffer globals#121

Merged
imranbarbhuiya merged 2 commits intoimranbarbhuiya:mainfrom
markdalgleish:polyfill-globals
Jun 26, 2023
Merged

feat: support process and Buffer globals#121
imranbarbhuiya merged 2 commits intoimranbarbhuiya:mainfrom
markdalgleish:polyfill-globals

Conversation

@markdalgleish
Copy link
Contributor

This is a new feature based on an issue reported against Remix: remix-run/remix#6665

In the linked issue (once the fix in #120 has been applied) the build fails due to a package that assumes the process global is available.

To address this scenario, this PR adds a new globals option to the plugin. In order to make this a non-breaking change, right now it's optional and disabled by default.

I realise there's a few details in this PR that you might want to change, particularly around the API and its surface area, but I thought this would be a good way to start the conversation at least.

Status and versioning classification:

  • Code changes have been tested and working fine, or there are no code changes
  • This PR changes the library's interface (methods or parameters added)

@imranbarbhuiya imranbarbhuiya merged commit c345cf6 into imranbarbhuiya:main Jun 26, 2023
@imranbarbhuiya
Copy link
Owner

Thanks, I tested both prs with the repo present in remix issue and some other default exports + non-default exports and it's working

@markdalgleish markdalgleish deleted the polyfill-globals branch June 26, 2023 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants