Meteor client code not perfectly minified on the browser source

So, we have an app deployed with docker. And when deployed on production the browser exposes client code when uses a pretty lint

I am aware of this issue Meteor Source code easily visible to client
I followed how he does the reinstallation of standard minifier package but no luck.

Do I need to follow some build command on docker to enable modification just like the Chatra does ( ) seeing their app is fully minified but a famous app like Lemlist ( ) was not minified

Thanks meteor community!

Iā€™m not sure what you mean here. Do you mean it exposes server code or that the client code is not properly minified and instead is prettified?

1 Like

Not the server code but the client code. When you go to Browser > Source, you could see client code that is not minified properly, you can even see the exact exposing the server method name when you when you pretty lint it. See the difference between Chatra and Lemlist as an example. By the way, I am using Windows 10 with Chrome Browser.

For having this available to everyone in this form in the future, could you please attach screen shots of what you are looking at. I think this would help to make your point more clear.

this is the screenshot

Exposed Client Code2

It looks to me like you have Pretty-print enabled (your first screenshot) which would format the minified code into something more readable.

1 Like

I think there is confusion because at first the source code seems minified (all method names, variables etc. shortened to a single char), but if one prettifies any of the sources of those pages it shows method names which may correspond to server methods:

Which seems to make OP believe minification does not work properly?

Actually, this is the whole point of what I am trying to say on this topic Haha. I hope Meteor got a better idea of how to solve this or some other devs here knows workaround about this because I really am curious how Chatra did this look at their app ( its fully minified.

At first code is minified, then when you enable pretty lint all of your source code on client was exposed

Of course, the method names have to be exposed in the minified code, as they are part of the interface between your client and the server. It is your duty as a developer to ensure the method calls are handled safely on server-side, as you would also do with REST calls.

1 Like