android icon indicating copy to clipboard operation
android copied to clipboard

Support Android components in package.json

Open triniwiz opened this issue 6 years ago • 4 comments

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

triniwiz avatar Sep 13 '19 13:09 triniwiz

Could you describe what would be better in this case instead of declaring your file in the appComponents section of the webpack config?

vmutafov avatar Sep 13 '19 13:09 vmutafov

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 🙃

triniwiz avatar Sep 13 '19 13:09 triniwiz

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.

vmutafov avatar Sep 13 '19 14:09 vmutafov

Thanks for the update 😃

triniwiz avatar Sep 13 '19 15:09 triniwiz

Supported via webpack

triniwiz avatar Sep 29 '22 13:09 triniwiz