Meteor Server Side - Minification?


#1

Why meteor build is not minifying any server side code?Is it an expected behaviour or is it worth to minimize the server side code using external compilers?


Deployment and Monitoring
#2

The main goal of minification is to minimize the size of JS / CSS files so they get downloaded by the browser as fast as possible (which means faster page loads). On the server this factor doesn’t exist, so minification would have no real benefits while making the building process longer.


#3

Thanks for the fast response.I was the thinking of making the application bundle size smaller for the purposes of sharing the code or moving the bundle to a cloud system.


#4

The bundle is usually compressed, so it’s not a big deal for the final bundle size that the server code is not minified :slight_smile:.


#5

Yes that is rite regarding sharing the bundle code.But does that require more space to be allocated for an app to run in cloud,especially other than the server side app specific code,node modules also will have unminfy code in server side.As far as I could the see the deployed app in cloudfoundry ,during staging the bundle is uncompressed,which will add on to the application size.


#6

One benefit of server-side code minification/uglification would be obfuscation of code for deploying an on-premise product. Without it, the ‘customer’ would have easy, readable access to server-side source code files, along with all comments, etc…