centralize code in build/main.js -- base is scripts/jsx/main.js