gmail.js
gmail.js copied to clipboard
Is it possible to use gmail.js without browserify and code minifiers?
We have developed an extension for Firefox and we want to submit to addons.mozilla.org. The validation process of an extension becomes very complicated when code generators like browserify have been used. https://extensionworkshop.com/documentation/publish/source-code-submission/
You can use other similar tools, like esbuild. Minification is strictly optional and not required at all.
Not using bunglers can be done, but has historically lead to issues with ensuring a proper loaded state, which is why that it’s no longer recommended.
Thank you very much for your quick response.
My question is focused on whether it is possible to use gmail.js without using any packaging or code generation tools (browserify, webpack, parcel, esbuild, etc) loading the Gmail JavaScript API (https://github.com/KartikTalwar/gmail.js/blob/master/src/gmail.js) instead of the generated file: /dist/gmailJsLoader.js after the execution of the command: npm run build
Do whatever you like. But if you don’t use bundling, you need to create a way to confidently ensure gmail.js loads early and is initialised correctly.
Seriously though. Everyone does bundling. All modern ES-based tooling works that way. Bundling is not an obstacle to AMO inclusion.
Just skip minifying the code and the reviewers should be happy.
But the generated file /dist/gmailJsLoader.js contains minified code at the beginning and end of the file and the AMO reviewers have unpublished the extension for this reason.
That’s being sorta backwards of them. Check out historical revisions of README.me for a bundler-free approach, or try a different bundler like esbuild, snowpack etc.
Ok thanks a lot for your help. Regards from Spain.