Meteor Source code easily visible to client

Hi,

So I am aware that some source code needs to be available to client for meteor to work correctly, however I thought that this was at least minified to some degree? I could not find other meteor sites that had similar source code showing without any minification. Is there something I am missing? Or is there any way I can minify these files or make them not show under the inspect -> sources ?

In this screenshot you can see under apps a lot of files are easily visible. Up on top there some minified files as well (which i believe is normal). But the stuff under “app” seem odd to show to me.

Are you running in production mode or development?

I believe in am in production. How do I double check this ? I know this happens on both localhost and when pushed to server and on mup i have it set to production:

env: {
ROOT_URL: *****,
PORT: ,
MONGO_URL: '
’,
METEOR_ENV: ‘production’
},

I just tried running meteor with --production and now I get this error about minifying!

While minifying app code:
eval at
(/Users/admin/.meteor/packages/standard-minifier-js/.1.2.2.vwa14x++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/tools/node.js:28:1),
:1547:18: SyntaxError: Unexpected token: name (version)
at new JS_Parse_Error (eval at
(/Users/admin/.meteor/packages/standard-minifier-js/.1.2.2.vwa14x++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/tools/node.js:28:1),
:1547:18)
at js_error (eval at
(/Users/admin/.meteor/packages/standard-minifier-js/.1.2.2.vwa14x++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/tools/node.js:28:1),
:1555:11)
at croak (eval at
(/Users/admin/.meteor/packages/standard-minifier-js/.1.2.2.vwa14x++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/tools/node.js:28:1),
:2094:9)
at token_error (eval at
(/Users/admin/.meteor/packages/standard-minifier-js/.1.2.2.vwa14x++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/tools/node.js:28:1),
:2102:9)
at unexpected (eval at
(/Users/admin/.meteor/packages/standard-minifier-js/.1.2.2.vwa14x++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/tools/node.js:28:1),
:2108:9)
at semicolon (eval at
(/Users/admin/.meteor/packages/standard-minifier-js/.1.2.2.vwa14x++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/tools/node.js:28:1),
:2128:56)
at simple_statement (eval at
(/Users/admin/.meteor/packages/standard-minifier-js/.1.2.2.vwa14x++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/tools/node.js:28:1),
:2319:73)
at eval (eval at
(/Users/admin/.meteor/packages/standard-minifier-js/.1.2.2.vwa14x++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/tools/node.js:28:1)
…,

Anyone here can help?! Does MUP not minify ?

I’m using pm2-meteor to deploy my apps.
In fact my own source code is well minified when i deploy. the only thing i’ve seen is that js from meteorhacks_zones are not minified, and i don’t understand why.

For anyone who experiences the same issue with --production failing or non-minified files showing on production this finally fixed it for me.

Remove the current "standard-minifier-js@xxxx"
Meteor install standard-minifier-js
Meteor update -all–packages
now run application.
You can do the same for the std-minfier-css
-Also make sure your mup.json file has debug set to false, and env to production
(If still doesnt work, create a new meteor project somewhere then check the versions of minifiers, then ensure your packages match those versions.)
I hope this helps someone out there as it took me months and multiple threads on here (with no solution) to finally fix.

Thanks!

1 Like