diff --git a/app/assets/javascripts/vue_shared/common_vue.js b/app/assets/javascripts/vue_shared/common_vue.js new file mode 100644 index 00000000000..eb2a6071fda --- /dev/null +++ b/app/assets/javascripts/vue_shared/common_vue.js @@ -0,0 +1,6 @@ +import Vue from 'vue'; +import './vue_resource_interceptor'; + +if (process.env.NODE_ENV !== 'production') { + Vue.config.productionTip = false; +} diff --git a/changelogs/unreleased/29043-upgrade-vue-and-remove-warnings.yml b/changelogs/unreleased/29043-upgrade-vue-and-remove-warnings.yml new file mode 100644 index 00000000000..9055b23a13f --- /dev/null +++ b/changelogs/unreleased/29043-upgrade-vue-and-remove-warnings.yml @@ -0,0 +1,4 @@ +--- +title: Upgrade VueJS to v2.2.4 and disable dev mode warnings +merge_request: 9981 +author: diff --git a/config/webpack.config.js b/config/webpack.config.js index c6794d6b944..3cf94b9b435 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -18,7 +18,7 @@ var config = { context: path.join(ROOT_PATH, 'app/assets/javascripts'), entry: { common: './commons/index.js', - common_vue: ['vue', 'vue-resource'], + common_vue: ['vue', './vue_shared/common_vue.js'], common_d3: ['d3'], main: './main.js', blob_edit: './blob_edit/blob_edit_bundle.js', @@ -132,7 +132,7 @@ var config = { 'empty_states': path.join(ROOT_PATH, 'app/views/shared/empty_states'), 'icons': path.join(ROOT_PATH, 'app/views/shared/icons'), 'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'), - 'vue$': 'vue/dist/vue.common.js', + 'vue$': 'vue/dist/vue.esm.js', } } } diff --git a/package.json b/package.json index b3d038bd3d1..91d8752bebb 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "stats-webpack-plugin": "^0.4.3", "timeago.js": "^2.0.5", "underscore": "^1.8.3", - "vue": "^2.1.10", + "vue": "^2.2.4", "vue-resource": "^0.9.3", "webpack": "^2.2.1", "webpack-bundle-analyzer": "^2.3.0" diff --git a/yarn.lock b/yarn.lock index 2500ddc6f6b..fb3bfce4d11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4464,9 +4464,9 @@ vue-resource@^0.9.3: version "0.9.3" resolved "https://registry.yarnpkg.com/vue-resource/-/vue-resource-0.9.3.tgz#ab46e1c44ea219142dcc28ae4043b3b04c80959d" -vue@^2.1.10: - version "2.1.10" - resolved "https://registry.yarnpkg.com/vue/-/vue-2.1.10.tgz#c9235ca48c7925137be5807832ac4e3ac180427b" +vue@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/vue/-/vue-2.2.4.tgz#d0a3a050a80a12356d7950ae5a7b3131048209cc" watchpack@^1.2.0: version "1.2.1"