Skip to content

Commit 3b2ca5b

Browse files
committed
add vimport-dynamic for better perf (see VueDose Tip 15 by Paul Melero)
1 parent 19d8dcb commit 3b2ca5b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ You can enable tab completion (recommended) by opening `Code > Preferences > Set
8282
| `vdestroyed` | destroyed lifecycle method |
8383
| `vprops` | Props with type and default |
8484
| `vimport` | Import one component into another |
85+
| `vimport-dynamic`| Import one component that should be lazy loaded by webpack |
8586
| `vcomponents` | Import one component into another within the export statement |
8687
| `vimport-export` | Import one component into another and use it within the export statement |
8788
| `vmapstate` | import mapState from Vuex into vue component component |

snippets/vue-script.json

+7
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@
121121
],
122122
"description": "import a component and include it in export default"
123123
},
124+
"Vue Import Component Dynamically": {
125+
"prefix": "vimport-dynamic",
126+
"body": [
127+
"const ${1:New} = () => import('@/components/${1:New}.vue')"
128+
],
129+
"description": "Import component that should be lazy loaded"
130+
},
124131
"Vue MapState": {
125132
"prefix": "vmapstate",
126133
"body": [

0 commit comments

Comments
 (0)