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

feat: port client from next.js to pure react #15

Merged
merged 3 commits into from Mar 4, 2022

Conversation

luizstacio
Copy link
Member

Closes: #14

@luizstacio luizstacio self-assigned this Mar 4, 2022
eureka-cpu
eureka-cpu previously approved these changes Mar 4, 2022
Copy link
Contributor

@eureka-cpu eureka-cpu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running yarn start gives me a page with

Compiled with problems:

ERROR in ./node_modules/@fuel-ts/providers/dist/util.js 18:17-34

Module not found: Error: Can't resolve 'crypto' in '/home/devel/local/fuellabs/swayswap-demo/client/node_modules/@fuel-ts/providers/dist'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
	- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
	- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "crypto": false }

@luizstacio
Copy link
Member Author

Running yarn start gives me a page with

Compiled with problems:

ERROR in ./node_modules/@fuel-ts/providers/dist/util.js 18:17-34

Module not found: Error: Can't resolve 'crypto' in '/home/devel/local/fuellabs/swayswap-demo/client/node_modules/@fuel-ts/providers/dist'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
	- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
	- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "crypto": false }

This was related to this PR: FuelLabs/fuels-ts#151 (comment) will be updating it.

Copy link
Contributor

@eureka-cpu eureka-cpu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ran locally and looks good! the faucet stopped working but I spoke with @luizstacio and we will fix it later

Copy link
Contributor

@adlerjohn adlerjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runs locally

@luizstacio luizstacio merged commit c77bd23 into master Mar 4, 2022
@luizstacio luizstacio deleted the luizstacio/next-to-react branch March 4, 2022 20:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Port Client from Next.js to pure React
3 participants