]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: add Vue to exploration
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 5 Jun 2019 15:02:19 +0000 (17:02 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 5 Jun 2019 15:02:19 +0000 (17:02 +0200)
explorations/html5.html
explorations/html5.ts
webpack.config.js

index bec4eec7db8d4a7effd3174b4ec05b5c1133bf41..8f31cb5cf557f6e46ff5d50450a03e93ddbf8165 100644 (file)
@@ -8,6 +8,7 @@
   </head>
   <body>
     <div id="app">
+      <h2>{{ message }}</h2>
       <label>
         <input type="checkbox" onchange="cancel = !cancel" /> Cancel Next
         Navigation
index ad585974fc185fdbb68ad1e4ccd1f99b465e2930..f10bd5fd06dd26f0bbdb40d95fd8dff7e22eb0a4 100644 (file)
@@ -1,11 +1,14 @@
 import { Router, HTML5History } from '../src'
 import { RouteComponent } from '../src/types'
+import Vue from 'vue'
 
 declare global {
   interface Window {
     cancel: boolean
+    vm: Vue
   }
 }
+
 window.cancel = false
 
 const component: RouteComponent = {
@@ -136,4 +139,12 @@ async function run() {
   await r.push({ name: 'a-child' })
 }
 
+window.vm = new Vue({
+  el: '#app',
+  // router,
+  data: {
+    message: 'hello',
+  },
+})
+
 run()
index 3c3a589e2cda83c0d9bc36aa76ae4b9d394a4732..fd1dc5c5fcbe6732cfb2cd9c74d4cb6d03caf848 100644 (file)
@@ -28,6 +28,9 @@ module.exports = {
     ],
   },
   resolve: {
+    alias: {
+      vue: resolve(__dirname, './node_modules/vue/dist/vue.esm.js'),
+    },
     // Add `.ts` and `.tsx` as a resolvable extension.
     extensions: ['.ts', '.tsx', '.js'],
   },