user1096808
user1096808

Reputation: 273

Where to insert Vue.productionTip = false in order to get rid of the vue development mode warning

I am a total newbie when it comes to js and all I am trying is to insert that line in order to turn the message off but regardless of where I put it the message stays. My code is

var getCalculatorApp = (function () {
    var initialize = function () {      
        new Vue({ 
            el: "#content",
            data: {
                region: "England"
            } //then others stuff and methods
        }); 
    }
    return {
        initialize: initialize
    };
})

Upvotes: 0

Views: 1080

Answers (2)

user1096808
user1096808

Reputation: 273

Yes the only thing that turned it off was me downloading and referring to vue min as opposed to vue.

Upvotes: 0

Radu Diță
Radu Diță

Reputation: 14191

You can add it at the top of your getCalculatorApp

var getCalculatorApp = (function () {
    Vue.productionTip = false
    var initialize = function () {      
        new Vue({ 
            el: "#content",
            data: {
                region: "England"
            } //then others stuff and methods
        }); 
    }
    return {
        initialize: initialize
    };
})

But to turn off the warning you most likely need to do a production build and that flag doesn't change it.

Upvotes: 1

Related Questions