1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-12-22 17:23:50 +01:00

remove web3.js webpack workaround

This commit is contained in:
Matthias Kretschmann 2020-04-03 14:52:20 +02:00
parent 3e866519dd
commit a69975a796
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 6 additions and 23 deletions

View File

@ -1,4 +1,3 @@
const webpack = require('webpack')
const { createMarkdownFields } = require('./gatsby/createMarkdownFields') const { createMarkdownFields } = require('./gatsby/createMarkdownFields')
const { createExif } = require('./gatsby/createExif') const { createExif } = require('./gatsby/createExif')
const { const {
@ -116,20 +115,3 @@ exports.onPostBuild = async ({ graphql }) => {
return Promise.resolve() return Promise.resolve()
} }
// Fix web3
// https://github.com/ethereum/web3.js/issues/1105#issuecomment-446039296
exports.onCreateWebpackConfig = ({ actions }) => {
actions.setWebpackConfig({
resolve: {
alias: {
// replace native `scrypt` module with pure js `js-scrypt`
scrypt: 'js-scrypt'
}
},
plugins: [
// ignore these plugins completely
new webpack.IgnorePlugin(/^(?:electron|ws)$/)
]
})
}

9
package-lock.json generated
View File

@ -1216,9 +1216,9 @@
} }
}, },
"@ethersproject/providers": { "@ethersproject/providers": {
"version": "5.0.0-beta.155", "version": "5.0.0-beta.159",
"resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.0.0-beta.155.tgz", "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.0.0-beta.159.tgz",
"integrity": "sha512-fA4lsmkFO2LCcso1Ayp1jfjcAcOGDPm15NRJMxLP34V9FsEqFcWkJbG3NET5DwdoMwwgzKz5Gx2aTGNbc6cmcw==", "integrity": "sha512-Z/PMP/Zb+l3jHsToLr0PuP1Vd6sXZFyJCRRGgB1APEZIaTSYmaakiR9OXtq8wz7avCNo3pjVl8UpNn2LOH9GjQ==",
"requires": { "requires": {
"@ethersproject/abstract-provider": ">=5.0.0-beta.131", "@ethersproject/abstract-provider": ">=5.0.0-beta.131",
"@ethersproject/abstract-signer": ">=5.0.0-beta.132", "@ethersproject/abstract-signer": ">=5.0.0-beta.132",
@ -1234,7 +1234,8 @@
"@ethersproject/rlp": ">=5.0.0-beta.126", "@ethersproject/rlp": ">=5.0.0-beta.126",
"@ethersproject/strings": ">=5.0.0-beta.130", "@ethersproject/strings": ">=5.0.0-beta.130",
"@ethersproject/transactions": ">=5.0.0-beta.128", "@ethersproject/transactions": ">=5.0.0-beta.128",
"@ethersproject/web": ">=5.0.0-beta.129" "@ethersproject/web": ">=5.0.0-beta.129",
"ws": "7.2.3"
} }
}, },
"@ethersproject/random": { "@ethersproject/random": {

View File

@ -29,7 +29,7 @@
"not op_mini all" "not op_mini all"
], ],
"dependencies": { "dependencies": {
"@ethersproject/providers": "5.0.0-beta.155", "@ethersproject/providers": "^5.0.0-beta.159",
"@ethersproject/units": "^5.0.0-beta.132", "@ethersproject/units": "^5.0.0-beta.132",
"@loadable/component": "^5.12.0", "@loadable/component": "^5.12.0",
"@web3-react/core": "^6.0.9", "@web3-react/core": "^6.0.9",