How to put Vue.js in production mode using webpack 2.7?

后端 未结 1 1187
无人共我
无人共我 2020-12-19 04:36

I\'ve got an existing code base in which Vue.js has performance problems. I also see this notice in the browser console:

so I guess an easy fix could be to

1条回答
  •  醉话见心
    2020-12-19 04:46

    The problem may be in your 'webpack.base.conf.js' as i suspected, thank you for sharing it, upon searching i've found an issue resolving your 'production not being detected' problem on github here

    The solution requires that you change 'vue$': 'vue/dist/vue' to 'vue$': vue/dist/vue.min in production.

    You will find the original answer as:

    @ozee31 This alias 'vue$': 'vue/dist/vue' cause the problem, use vue/dist/vue.min in production environment.

    0 讨论(0)
提交回复
热议问题