Hi,
Currently I’m trying to get my first add-on trough the review process. It’s an add-on that connects to MetaMask and gathers ownership information about specific tokens on the Ethereum blockchain. To achieve this the metamask-extension-provider and web3 are used. These dependencies are installed using NPM and a version-lock file is provided to make sure the versions of the dependencies match.
As outlined on https://github.com/MetaMask/extension-provider browserify is used to be able to package this into a bundle.js for use in the add-on.
However I’m not able to match the resulting bundle.js the Mozilla reviewer gets. At first I thought that de difference was caused because of version mismatches of the used tools (npm, node and browserify) since I used Arch during development and the reviewer used Ubuntu 20.04 . So I installed a Ubuntu 20.04 VM where I installed the specific versions of the tools the reviewer used (node v17.1.0, npm 8.1.2 and browserify 17.0.0). Unfortunately there is still a mismatch, so the add-on can’t be approved by the reviewer.
If i compare the resulting files I get the following Diff.
46780,46781c46780,46781
< }).call(this)}).call(this,{"isBuffer":require("../../../../../../../.nvm/versions/node/v17.1.0/lib/node_modules/browserify/node_modules/is-buffer/index.js")})
< },{".":285,"../../../../../../../.nvm/versions/node/v17.1.0/lib/node_modules/browserify/node_modules/is-buffer/index.js":152,"ethereumjs-util":496}],288:[function(require,module,exports){
---
> }).call(this)}).call(this,{"isBuffer":require("../../../../../../.nvm/versions/node/v17.1.0/lib/node_modules/browserify/node_modules/is-buffer/index.js")})
> },{".":285,"../../../../../../.nvm/versions/node/v17.1.0/lib/node_modules/browserify/node_modules/is-buffer/index.js":152,"ethereumjs-util":496}],288:[function(require,module,exports){
59835,59836c59835,59836
< }).call(this)}).call(this,{"isBuffer":require("../../../../../../.nvm/versions/node/v17.1.0/lib/node_modules/browserify/node_modules/is-buffer/index.js")})
< },{"../../../../../../.nvm/versions/node/v17.1.0/lib/node_modules/browserify/node_modules/is-buffer/index.js":152,"./internal":497}],496:[function(require,module,exports){
---
> }).call(this)}).call(this,{"isBuffer":require("../../../../../.nvm/versions/node/v17.1.0/lib/node_modules/browserify/node_modules/is-buffer/index.js")})
> },{"../../../../../.nvm/versions/node/v17.1.0/lib/node_modules/browserify/node_modules/is-buffer/index.js":152,"./internal":497}],496:[function(require,module,exports){
It seems that browserify keeps referencing to local relative paths (which is useless when running in the browser anyway). The resulting bundle.js files does seem to work. Does anybody have any experience with similar issues when using browserify? And did you manage to fix it/get the add-on reviewed?
Any help is greatly appreciated .