Skip to content

Commit 2126bc3

Browse files
committed
Added vue router as a dev dependency.
1 parent 7ee5816 commit 2126bc3

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@vue/cli-plugin-babel": "^3.0.5",
1717
"@vue/cli-plugin-eslint": "^3.0.5",
1818
"@vue/cli-service": "^3.0.5",
19+
"vue-router": "^3.3.2",
1920
"vue-template-compiler": "^2.5.17"
2021
},
2122
"files": [

public/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
<noscript>
1212
<strong>We're sorry but vue-email-editor doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
1313
</noscript>
14-
<div id="app"></div>
14+
<div id="app">
15+
<router-view></router-view>
16+
</div>
1517
<!-- built files will be auto injected -->
1618
</body>
1719
</html>

src/main.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
import Vue from 'vue'
1+
import Vue from 'vue/dist/vue.js'
22
import App from './App.vue'
3+
import VueRouter from 'vue-router'
34

45
Vue.config.productionTip = false
56

7+
const routes = [
8+
{ path: '/', component: App },
9+
]
10+
11+
const router = new VueRouter({
12+
routes
13+
})
14+
15+
Vue.use(VueRouter)
16+
617
new Vue({
7-
render: h => h(App)
18+
router
819
}).$mount('#app')

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7390,6 +7390,11 @@ vue-loader@^15.4.2:
73907390
vue-hot-reload-api "^2.3.0"
73917391
vue-style-loader "^4.1.0"
73927392

7393+
vue-router@^3.3.2:
7394+
version "3.3.2"
7395+
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.3.2.tgz#0099de402edb2fe92f9711053ab5a2156f239cad"
7396+
integrity sha512-5sEbcfb7MW8mY8lbUVbF4kgcipGXsagkM/X+pb6n0MhjP+RorWIUTPAPSqgPaiPOxVCXgAItBl8Vwz8vq78faA==
7397+
73937398
vue-style-loader@^4.1.0:
73947399
version "4.1.2"
73957400
resolved "https://registry.yarnpkg.com/vue-style-loader/-/vue-style-loader-4.1.2.tgz#dedf349806f25ceb4e64f3ad7c0a44fba735fcf8"

0 commit comments

Comments
 (0)