add less compiling dev vs production logic

add less compiling dev vs production logic, need to split out into
middleware.