From a99161f68560edaa2bdd9bff4833280a27dfae28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Thu, 26 Jan 2017 16:01:22 +0100 Subject: [PATCH] Use ES6 syntax for hooks in transition key --- lib/app/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/app/index.js b/lib/app/index.js index 740c6b41c4..18f0aca2bd 100644 --- a/lib/app/index.js +++ b/lib/app/index.js @@ -41,7 +41,12 @@ require('<%= pluginPath %>') // root instance // here we inject the router and store to all child components, // making them available everywhere as `this.$router` and `this.$store`. -const defaultTransition = <%= serialize(transition) %> +const defaultTransition = <%= +serialize(transition) +.replace('beforeEnter(', 'function(').replace('enter(', 'function(').replace('afterEnter(', 'function(') +.replace('enterCancelled(', 'function(').replace('beforeLeave(', 'function(').replace('leave(', 'function(') +.replace('afterLeave(', 'function(').replace('leaveCancelled(', 'function(') +%> const app = { router, <%= (store ? 'store,' : '') %>