From c4aa079d4edbcab96c0cf2da3f91e13d05b35683 Mon Sep 17 00:00:00 2001 From: Neko Ayaka Date: Wed, 4 Dec 2024 11:48:43 +0800 Subject: [PATCH] chore: basic configuration for threejs --- packages/stage/src/components/ThreeViewer.vue | 5 +++-- packages/stage/src/main.ts | 2 ++ packages/stage/vite.config.ts | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/stage/src/components/ThreeViewer.vue b/packages/stage/src/components/ThreeViewer.vue index 128684b..5a926bb 100644 --- a/packages/stage/src/components/ThreeViewer.vue +++ b/packages/stage/src/components/ThreeViewer.vue @@ -1,9 +1,10 @@ diff --git a/packages/stage/src/main.ts b/packages/stage/src/main.ts index 306f37d..10cd936 100644 --- a/packages/stage/src/main.ts +++ b/packages/stage/src/main.ts @@ -1,3 +1,4 @@ +import Tres from '@tresjs/core' import NProgress from 'nprogress' import { createPinia } from 'pinia' import { setupLayouts } from 'virtual:generated-layouts' @@ -34,4 +35,5 @@ createApp(App) .use(router) .use(pinia) .use(i18n) + .use(Tres) .mount('#app') diff --git a/packages/stage/vite.config.ts b/packages/stage/vite.config.ts index 7f7112c..f348144 100644 --- a/packages/stage/vite.config.ts +++ b/packages/stage/vite.config.ts @@ -3,6 +3,7 @@ import { copyFile, cp, mkdir } from 'node:fs/promises' import path, { join, resolve } from 'node:path' import VueI18n from '@intlify/unplugin-vue-i18n/vite' +import { templateCompilerOptions } from '@tresjs/core' import Vue from '@vitejs/plugin-vue' import { ofetch } from 'ofetch' import Unocss from 'unocss/vite' @@ -53,6 +54,7 @@ export default defineConfig({ plugins: { vue: Vue({ include: [/\.vue$/, /\.md$/], + ...templateCompilerOptions, }), }, }),