For my Vue SPA thus far, my package.json looks like this:
"dependencies": {
"@openzeppelin/contracts-ethereum-package": "^2.4.0",
"@openzeppelin/gsn-provider": "^0.1.6",
"@openzeppelin/solidity-loader": "^1.4.6",
"@openzeppelin/upgrades": "^2.5.3",
"truffle-contract": "^3.0.3",
"vue": "^2.5.13",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"web3": "^1.2.1"
},
"devDependencies": {
"@openzeppelin/cli": "^2.5.3",
"@openzeppelin/contracts": "^2.4.0",
"@openzeppelin/gsn-helpers": "^0.2.3",
"@vue/cli-plugin-babel": "^3.0.0-alpha.11",
"@vue/cli-plugin-eslint": "^4.2.3",
"@vue/cli-plugin-unit-jest": "^4.1.2",
"@vue/cli-plugin-unit-mocha": "^4.2.2",
"@vue/cli-service": "^3.0.0-alpha.11",
"@vue/eslint-config-standard": "^5.1.0",
"@vue/test-utils": "1.0.0-beta.31",
"babel-eslint": "^10.0.3",
"babel-register": "^6.22.0",
"chai": "^4.1.2",
"eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^6.1.2",
"node-sass": "^4.7.2",
"sass-loader": "^6.0.6",
"vue-template-compiler": "^2.5.13"
},
I’m trying to clean up the package to the absolute bare essentials (and solve a persistent error when I use web3 version >1.x ). When I look into node_modules I noticed that two versions of web3 are involved in OZ packages and truffle 1.2.6 and 1.2.1. That may be trivial however and I haven’t yet optimized bundle size /pageload speed until can get web3 working again.
web console:
TypeError: Object(...).version is undefined
["./node_modules/readable-stream/lib/_stream_writable.js"]()
...
["./node_modules/web3/node_modules/web3-providers-http/src/index.js"]()
....
["./node_modules/web3/node_modules/web3-core-requestmanager/src/index.js"]()
...
["./node_modules/web3/node_modules/web3-core/src/index.js"]()
....
["./node_modules/web3/src/index.js"]()