Skip to content

Commit fccb412

Browse files
committed
demo5 - added async component
1 parent 2e7bc45 commit fccb412

File tree

3 files changed

+71
-2
lines changed

3 files changed

+71
-2
lines changed

src/demo5/client/main.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
import Vue from "vue";
2-
import MainComponent from './main-component.vue';
32

4-
new Vue({ el: "#app", components: { MainComponent } });
3+
new Vue({
4+
el: "#app",
5+
components: {
6+
MainComponent: () => import('./main-component.vue')
7+
}
8+
});

src/demo5/custom.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
declare module '*.html' {
2+
var _: string;
3+
export default _;
4+
}
5+
6+
declare module "*.vue" {
7+
import Vue from 'vue'
8+
export default Vue
9+
}

0 commit comments

Comments
 (0)