From 8ea41064c736d5d52b58558e1cc143c224aeff54 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 25 Dec 2021 00:38:51 -0500 Subject: [PATCH] [+] Use dynamic vue rendering --- src/main.ts | 9 ++++++++- src/views/About.vue | 4 ++-- vue.config.js | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index 00831cc..c186c97 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,9 +1,16 @@ -import {createApp} from 'vue' +import {createApp, h} from 'vue' import App from './App.vue' import router from './scripts/router' import {i18n} from "@/messages"; import '@fortawesome/fontawesome-free/css/all.min.css' const app = createApp(App).use(router).use(i18n) + .component('Dynamic', { + props: ['template'], + render() { + return h({template: this.template}) + } + }) + // app.config.performance = true app.mount('#app') diff --git a/src/views/About.vue b/src/views/About.vue index 8500f7e..74a23c3 100644 --- a/src/views/About.vue +++ b/src/views/About.vue @@ -1,6 +1,6 @@ diff --git a/vue.config.js b/vue.config.js index 36b014d..761e61d 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,4 +1,5 @@ module.exports = { + runtimeCompiler: true, devServer: { disableHostCheck: true }