CleverTap / clevertap-web-sdk

CleverTap Web SDK
https://clevertap.com/
MIT License
12 stars 18 forks source link

feat: created dynamic config based on env variables #194

Closed kkyusuftk closed 4 months ago

kkyusuftk commented 4 months ago

Problem: We are maintaining two separate config for generating output files. In future we might want to have more of the code which we want to bundle slightly differently. In that scenario, creating new configs is not a scalable solution.

Solution: Making our rollup config more dynamic. We get rid of sw_rollup.config.js in favour of just one config. We segregate the build by passing MODE env variable.

Test: I have deleted the generated files in the repository and re-generated it with the new config. No extra changes were commited and no extra files were changed.

kkyusuftk commented 4 months ago

This is a pre requisite to my shopify changes which will come after this PR.