Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Add polyfill for http and https #2345

Conversation

rmeissner
Copy link
Contributor

@rmeissner rmeissner commented Feb 11, 2022

Contributes to #1245

Changes:

  • sets http polyfill to stream-http
  • sets https polyfill to https-browserify

Notes:

  • isomporphic-ws was already set

@rmeissner
Copy link
Contributor Author

I tested this by using ganache in a react app. I worked well with the dev server, but if I perform a production optimized build I get a compiler error TypeError: /ganache/src/packages/ganache/dist/web/ganache.min.js: Duplicate declaration "a" ... not sure why.

@rmeissner
Copy link
Contributor Author

I couldn't get the URL error fixed easily. Any idea how to go at this? I thought I can polyfill this, but it doesn't work and now I was thinking about using a wrapper library such as native-url, but then the used type definitions don't work in all places out of the box :(

@davidmurdoch
Copy link
Member

The browser has a native URL support, so I'm not sure what's going on with that. I'll take a closer look at this today.

@rmeissner
Copy link
Contributor Author

Yes. I found an article that it should be possible just to remove the import. But this doesn't work in all places (it does in some)

@davidmurdoch
Copy link
Member

We're finally getting this working. Thanks for starting it! I've moved the work from this PR over to #3130 so I can finish up the work on a branch based on this repository. See: #3130!

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

Successfully merging this pull request may close these issues.

2 participants