From ab73752f55791eae512764d51a5884002d3dedd6 Mon Sep 17 00:00:00 2001
From: Eliot Berriot <contact@eliotberriot.com>
Date: Wed, 10 Jul 2019 14:38:56 +0200
Subject: [PATCH] See #880: removed vue runtime to remove "eval()" calls

Needed for CSP, and also helps with redusing JS size ;)
---
 front/src/embed.js  | 4 +++-
 front/src/main.js   | 4 +++-
 front/vue.config.js | 5 -----
 3 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/front/src/embed.js b/front/src/embed.js
index 5a924a9b..a079ee08 100644
--- a/front/src/embed.js
+++ b/front/src/embed.js
@@ -10,6 +10,8 @@ Vue.config.productionTip = false
 /* eslint-disable no-new */
 new Vue({
   el: '#app',
-  template: '<EmbedFrame/>',
+  render (h) {
+    return h('EmbedFrame')
+  },
   components: { EmbedFrame }
 })
diff --git a/front/src/main.js b/front/src/main.js
index dd755dee..145fa611 100644
--- a/front/src/main.js
+++ b/front/src/main.js
@@ -122,7 +122,9 @@ store.dispatch('instance/fetchFrontSettings').finally(() => {
     el: '#app',
     router,
     store,
-    template: '<App/>',
+    render (h) {
+      return h('App')
+    },
     components: { App }
   })
 
diff --git a/front/vue.config.js b/front/vue.config.js
index 4b1d9f5d..4b149a05 100644
--- a/front/vue.config.js
+++ b/front/vue.config.js
@@ -30,11 +30,6 @@ module.exports = {
   },
   configureWebpack: {
     plugins: plugins,
-    resolve: {
-      alias: {
-        'vue$': 'vue/dist/vue.esm.js'
-      }
-    }
   },
   devServer: {
     disableHostCheck: true,
-- 
GitLab