webapp: put the requirejs configuration in an object before appending it to requirejs.config in order to solve a bug of intermittent script error