Adding array of values in env
My extension will run on several sites e.g. amazon, ebay, alibaba. Each site has some specific configurations like the website domain and the specific div classes that I use to locate products on the site. Currently I have these configurations in their own .env.amazon, .env.ebay, .env.alibaba and create a build for each ...
But we now want one build that will work on all three sites and any site we may add in the future (we'll be adding sites often). To my understanding, env files only take string values so my only option is to concatenate all the values into a pipe-separated string like so
And then modify my existing code to parse the values
Is this the only option? I'm worried about having one giant string bc
1. maintenance/readability - we'll be adding a lot of customers soon
2. collisions of div classes, for instance if ".product-image" is the appropriate class for amazon but also exists in ebay it could mess things up
I would like to keep them visually separated like in the env above if possible. I'm sure there are JSON based env-type files but does Plasmo work with those? I definitely want to keep the configuration in a separate file (not hardcoded) so that if we sign another customer onboarding them is as easy as adding to the config file
Thanks!
But we now want one build that will work on all three sites and any site we may add in the future (we'll be adding sites often). To my understanding, env files only take string values so my only option is to concatenate all the values into a pipe-separated string like so
And then modify my existing code to parse the values
Is this the only option? I'm worried about having one giant string bc
1. maintenance/readability - we'll be adding a lot of customers soon
2. collisions of div classes, for instance if ".product-image" is the appropriate class for amazon but also exists in ebay it could mess things up
I would like to keep them visually separated like in the env above if possible. I'm sure there are JSON based env-type files but does Plasmo work with those? I definitely want to keep the configuration in a separate file (not hardcoded) so that if we sign another customer onboarding them is as easy as adding to the config file
Thanks!