enables dir to be module.
updates settings for production compatibility.