Hello, anyone here tried writing Webextension in K...
# javascript
j
Hello, anyone here tried writing Webextension in Kotlin? Im done, but when using
web-ext build
the result 'ready to upload' zip, seems to contain unnecessary files (Im assuming webext builder doesnt know it's safe to skip them). For example there are still kt source files inside, gradle wrapper etc. Any hints what should be safe to remove by hand?
a
I might be wrong, but it seems you should add a
manifest.json
and specify the required
.js
files in
content_scripts.js
(see https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/content_scripts)
Also it might be a good idea to apply DCE before publishing
If you have a single module "extension" you'll need to keep
kotlin.js
and
extension.js
j
yes, im using dce already. Thanks, I'll try removing the rest 👍
j
@bashor great articles, unfortunately they skip over the build/publish part. In the end I ended up removing everything but build folder and manifest for final zip, seems to be working fine
b
So, that’s time to share your experience 😉