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.
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 passingMODE
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.