Me is undefined when I run with --production flag

As I asked on: https://stackoverflow.com/questions/45329558/meteor-with-react-i-get-me-is-not-defined-when-i-run-the-build-application

My application runs just fine when i run it via:

meteor run --settings="settings-file.json"

But when I run it via:

meteor run --settings="settings-file.json" --production

In order to simulate how my app will behave when I run it on the production server.
The problem that I get the following error message when I run via --production flag:

Uncaught ReferenceError: me is not defined

So I want to ask the following questions:

1 How can I figure out why does it happen?
2 How can I pass extra params to meteor minifier in order to tell do not minify x y .js file if a 3rd party library causes the error?
3 How can I tell to meteor to use another minifier if possible?

In the end a simple change to the minifier is the way of surviving!

Yeah - had the same issue. Remove the standard minifier and replaced it with @abernix’s minifier, which fixed it.

How did you fix your problem? Can you explain what it was cause I don’t really understand why what I did worked either.

I mused the very same one