exteranto / framework

The Exteranto browser extension framework core packages.
https://exteranto.github.io
MIT License
5 stars 4 forks source link

Provide the functionality to create customised builds for different browsers #145

Open userhooke opened 4 years ago

userhooke commented 4 years ago

Is your feature request related to a problem? Please describe. We faced an issue where we have to remove some functionality from our extension build for Firefox due to their policies. Most probably, the same would occur for the upcoming Safari 14.

At the moment this is something we have to do manually with each release.

Describe the solution you'd like Provide some kind of config to specify which modules should and should not go into which builds.

Describe alternatives you've considered Technically it is already possible at a project level, by extending Exteranto webpack config and providing custom plugins. However it would be very convenient to have such functionality out of the box in Exteranto.

haydnba commented 4 years ago

Thanks for this Vladimir - I think to gain some clarity, we should put together a comparison of the policies of the different browser vendors and try to give ourselves a clear picture of exactly (at this current time) what differences the would need to be in the browser-specific builds in order to satisfy each. This should help us think about what would be the best approach technically as I believe there are going to be a few different levels of customisation required (e.g. what are the default settings for analytics at installation? vs. can the codebase execute arbitrarily injected code? ...).

(I am also all of a sudden wondering if Firefox will even be a player in the browser market before long given the recent massive layoffs at Mozilla 😢 )

I think we should perhaps also make an issue corresponding to this one on the exteranto/cli repository.

porkbrain commented 4 years ago

What are some of the plugins you considered for project level module exclusion?

haydnba commented 4 years ago

What are some of the plugins you considered for project level module exclusion?

Firefox will no longer validate a browser extension that has the capacity to execute remotely hosted code, so, currently, to pass the verification stage we must remove all 'custom script' related code from the resulting build artefact by hand :cry:

It would be nice if we could provide a way to handle this at the build phase, maybe as is done for cross-platform native app frameworks etc.

userhooke commented 4 years ago

What are some of the plugins you considered for project level module exclusion?

So far the closest thing I found is Context Replacement Plugin. I assume we could use that to remove some particular modules at build time.