Sure... Follow my comments above. The `onBuildWrite` function is executed for each file that requirejs optimizer processes, ie. `main.js`, plus all the UI components. The `require` is in the generated `main.js`.