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

Throws error when minified and concatenated with a "use strict" script #81

Closed
Munter opened this issue Feb 8, 2014 · 1 comment
Closed

Comments

@Munter
Copy link

Munter commented Feb 8, 2014

When Vue is a part of a built website that happens to concatenate and minify (only tested with uglify2), and another script adds 'use strict'; to the global scope, the minified Vue.js script throws a JS exception in the part o the script that assigns the library to this.Vue (this is undefined).

To recreate:

echo "'use strict';" > vue.min.js; uglifyjs vue.js >> vue.min.js

Then try using vue.min.js

Using the official UMD factory pattern fixes this if I remember correctly

@yyx990803
Copy link
Member

yes, thanks for reporting. this is caused by the build plugin and has been fixed in dev branch.

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