Skip to content

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

Closed
@Munter

Description

@Munter

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions