Skip to content

How to shim Buffer and crypto? #3126

Answered by clarkbynum
mattiaz9 asked this question in Q&A
Apr 24, 2021 · 7 comments · 24 replies
Discussion options

You must be logged in to vote

I used https://github.com/feross/buffer and include it in my entry point like so:

import { Buffer } from 'buffer';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App';
window.Buffer = Buffer;

ReactDOM.render(<App />, document.getElementById('root'));

Hope this works for others!

Replies: 7 comments 24 replies

Comment options

You must be logged in to vote
12 replies
@snehalbaghel
Comment options

@mattiaz9
Comment options

@savv
Comment options

@weimingxinas
Comment options

@jo32
Comment options

Comment options

You must be logged in to vote
7 replies
@shixinla
Comment options

@clemsos
Comment options

@gat786
Comment options

@WaterlessPiano2
Comment options

@aiinkiestism
Comment options

Answer selected by Shinigami92
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@manzt
Comment options

Comment options

You must be logged in to vote
2 replies
@akash87
Comment options

@Elfayer
Comment options

Comment options

You must be logged in to vote
2 replies
@zpcq123
Comment options

@itxtoledo
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet