I am now trying to modulize my javascript code using RequireJS. I have 2 JS files (let's say A and B). A is a big file that has main code for my html page. B is a small utility library which is designed to be used by A and any other code in the future.
My plan is to firstly modulize B since B is small. After this I can write all my new code using RequireJS in the future and use B. On the other hand I will gradually modulize A. My concern now is that after I modulize B, is there a way that file A can continue use code in B so that my app can work correctly?
I cannot find out anything about this. Any suggestions, articles or sample code are welcome.