enhanced generator to support minification and production build