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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion src/packages/ganache/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/packages/ganache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"cross-env": "7.0.3",
"crypto-browserify": "3.12.0",
"events": "3.3.0",
"https-browserify": "1.0.0",
"isomorphic-ws": "4.0.1",
"level-js": "5.0.2",
"mcl-wasm": "0.9.0",
Expand All @@ -76,6 +77,7 @@
"shebang-loader": "0.0.1",
"shx": "0.3.3",
"stream-browserify": "3.0.0",
"stream-http": "3.2.0",
"terser-webpack-plugin": "5.2.5",
"ts-loader": "9.2.6",
"ts-node": "10.4.0",
Expand Down
5 changes: 3 additions & 2 deletions src/packages/ganache/webpack/webpack.browser.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ const config: webpack.Configuration = merge({}, base, {
events: require.resolve("events/"),
buffer: require.resolve("buffer/"),
fs: false,
http: false,
https: false
// Taken from https://webpack.js.org/configuration/resolve/#resolvefallback
http: require.resolve('stream-http'),
https: require.resolve('https-browserify'),
//#endregion node polyfills
},
alias: {
Expand Down