pact-lang-api
pact-lang-api copied to clipboard
Webpack v5 removed polyfils for core modules
Issue description:
In the most recent version webpack removed polyfills for core modules which now need to be manually configured.
create-react-app uses webpack v5 and developers building a Dapp using it will see their build failing if pact-lang-api is used as a dependency.
Solution:
- Eject the
create-react-appconfig or usereact-app-rewired - Install missing deps (https-browserify, stream-http, buffer)
- Adjust the webpack config file
....
fallback: {
https: require.resolve("https-browserify"),
http: require.resolve("stream-http"),
buffer: require.resolve("buffer")
},