Removed duplicate requirejs.optimize call

No reason to call `requirejs.optimize` twice, and prefer it with an error callback.