android
android copied to clipboard
Support Android components in package.json
So at times plugin devs may need to extend classes to be used for android services e.g Broadcast Receiver, Activities, Firebase Message Service.. etc .. it would be nice if we can do something like the following .... the key is used to name the .js output
"android": {
"components": {
"boot-receiver": "relative/pathtofile"
}
}
Now we can throw any file we want hitting SBG in the components
Could you describe what would be better in this case instead of declaring your file in the appComponents section of the webpack config?
I was looking at making it simpler for the plugin creator and consumer .. so adding something like above into the package.json .. I'm sure a lot of devs might lose time after upgrading webpack only to realize they forgot to add the file into the webpack config ... if it's a no go I'll stick to slinging java 🙃
Ok, I got your point :) I'll mark this as a feature request and currently, the workaround is to tell the plugin users to add the js/ts file with native extends into their appComponents section in the webpack config or to export the function which makes the extend in your plugin. The CLI team has some ideas about allowing plugins to create their own part of the webpack.config and at build time to merge plugins' configs and the app config but this is currently not planned and it's not known if or when will that happen.
Thanks for the update 😃
Supported via webpack