forked from nativescript-vue/vue-cli-plugin-nativescript-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrouter.js
53 lines (43 loc) · 1.02 KB
/
router.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
extend: '@vue/cli-service/generator/router.js'
replace:
- !!js/regexp /import Vue from 'vue'/
- !!js/regexp /import Router from 'vue-router'/
- !!js/regexp /Vue.use\(Router\)/
- !!js/regexp /export default new Router\(\{/
- !!js/regexp /import Home from '\./views/Home.vue'/
- !!js/regexp /\(\) => import(.*)\.\/views\/About\.vue'\)/
- !!js/regexp /(\s+)\/\/ (.*)/
- !!js/regexp /(\s+)\/\/ (.*)/
- !!js/regexp /(\s+)\/\/ (.*)/
- !!js/regexp /\}\)/
---
<%# REPLACE %>
import Vue from 'vue';
<%# END_REPLACE %>
<%# REPLACE %>
import Router from 'vue-router';
<%# END_REPLACE %>
<%# REPLACE %>
Vue.use(Router);
<%# END_REPLACE %>
<%# REPLACE %>
export const options = {
<%# END_REPLACE %>
<%# REPLACE %>
import Home from '~/views/Home.vue';
import About from '~/views/About.vue';
<%# END_REPLACE %>
<%# REPLACE %>
About,
<%# END_REPLACE %>
<%# REPLACE %>
<%# END_REPLACE %>
<%# REPLACE %>
<%# END_REPLACE %>
<%# REPLACE %>
<%# END_REPLACE %>
<%# REPLACE %>
};
export default new Router(options);
<%# END_REPLACE %>