I would recommend working through all the articles in the Architecture Overview, The New Architecture, Migrating to the New Architecture sections. But that is a lot of information to digest at once, so I would starting with the following articles:
Webpack 4 automatically polyfilled many Node APIs in the browser. This was not a great system, because it could lead to surprisingly giant libraries getting pulled into your app by accident, and it gave you no control over the exact versions of the polyfills you were using.
So Webpack 5 removed this functionality. That means you need to make changes if you were relying on those polyfills. This is a quick reference for how to replace the most common patterns.
For each automatically-polyfilled node package name on the left, this shows the name of the NPM package that was used to polyfill it on the right. Under webpack 5 you can manually install these packages and use them via resolve.fallback
.
import browser from 'webextension-polyfill' | |
import { useState, useEffect } from 'react' | |
function isDiferent (a, b) { | |
if (typeof a !== typeof b) { | |
return true | |
} | |
if (Array.isArray(a)) { | |
return arrayIsDifferent(a, b) | |
} |
export const ws = webSocket<WebsocketMessage>(`wss://${location.hostname}:${location.protocol === 'https:' ? 443 : 80}/ws/`); | |
export const wsObserver = ws | |
.pipe( | |
retryWhen(errors => | |
errors.pipe( | |
delay(1000) | |
) | |
) | |
); |
{ | |
"main": "server/index.js", | |
"scripts": { | |
"dev": "nodemon --watch server server/index.js", | |
"build": "next build", | |
"start": "NODE_ENV=production node server/index.js" | |
}, | |
"dependencies": { | |
"apollo-boost": "^0.1.13", | |
"apollo-server": "^2.0.4", |
#!/bin/sh | |
# by Stadicus | |
# make executable and copy script to /etc/update-motd.d/ | |
# root must be able to execute bitcoin-cli and lncli | |
# set colors | |
color_red='\033[0;31m' | |
color_green='\033[0;32m' | |
color_yellow='\033[0;33m' | |
color_gray='\033[0;37m' |
The algorithm that used to be described here is broken.
A better alternative is described here: https://github.com/sipa/writeups/tree/main/elligator-square-for-bn