Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minified version not working #1

Closed
soulchainer opened this issue Apr 23, 2016 · 3 comments
Closed

Minified version not working #1

soulchainer opened this issue Apr 23, 2016 · 3 comments

Comments

@soulchainer
Copy link

I don't know if is only me, but the minified version doesn't work. It spills the

Uncaught SyntaxError: Unexpected token )

error just by loading it, in both, Firefox Developer Edition 47 and Chrome 50, at least.
I had to minify this with ShrinkSafe to get a acceptable size and a working script.

Seems like UglifyJS breaks this particular (because generally it's my chosen one too) code with their «optimizations». And same happens with other alternatives, like Google Closure minifier.

@chrisdavies
Copy link
Owner

I updated the file /test/eev.html so that it loads eev.min.js. Can you pull master down locally and open that file and confirm that it shows the tests passing?

Are you running UglifyJS on the eev.min.js or on eev.js? I don't usually re-uglify .min files, and I'm not sure what the behavior would be in that situation.

@soulchainer
Copy link
Author

It passes the tests, yes.

I think right now that probably I was doing something wrong or is a problem caused by the platform (Tumblr, don't judge me).

I just needed eev.min.js and I grabbed it manually from the repository and tried it. I'm not using a build system (this time), so I wasn't minifying anything myself (and I don't re-minify a minified script usually). But the minified version you have in the repository (that, according to the package.json should be minified with UglifyJS) wasn't working, so then I grabbed the eev.js and tried it unminified. And it worked. So, I imagined the problem was the minification, so I tried to minify it myself. First with UglifyJS → didn't work. Later with other minifiers, till I found one that worked :þ (the mentioned ShrinkSafe).

But now that I saw your tests passing correctly with the minified version, I tried it in a plunker... and it runs without errors. And tried just now in Fiddle and works all right. And tried in another Tumblr and... It breaks. So it must be something in Tumblr what is messing with the script minified that way... I should have tried that before, I don't know why I didn't do it: this isn't the first weird error Tumblr causes me.

I feel very sorry for wasting your time, man. My apologies :(.

@chrisdavies
Copy link
Owner

Hey, no worries. I would have done exactly the same in your shoes. Strange to hear that it doesn't work on Tumblr. I'd be interested to hear back from you if you ever can figure out why that is! Meanwhile, I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants