From 08587013705b041e6c12257070c8fdbb5e8ca9c7 Mon Sep 17 00:00:00 2001 From: alvarosabu Date: Thu, 22 Jun 2023 08:43:58 +0200 Subject: [PATCH] docs: blog announcement for nuxt module --- .../cache/deps_temp_9655456f/package.json | 3 --- docs/blog/announcing-tres-nuxt-module.md | 21 +++++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) delete mode 100644 docs/.vitepress/cache/deps_temp_9655456f/package.json diff --git a/docs/.vitepress/cache/deps_temp_9655456f/package.json b/docs/.vitepress/cache/deps_temp_9655456f/package.json deleted file mode 100644 index 3dbc1ca59..000000000 --- a/docs/.vitepress/cache/deps_temp_9655456f/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/docs/blog/announcing-tres-nuxt-module.md b/docs/blog/announcing-tres-nuxt-module.md index 043b222d0..d8a803b2e 100644 --- a/docs/blog/announcing-tres-nuxt-module.md +++ b/docs/blog/announcing-tres-nuxt-module.md @@ -102,6 +102,27 @@ const { onLoop } = useRenderLoop() ``` +### Client-side only + +The `` is only loaded in the client-side, so you don't need to worry about **SSR** or **SSG** 😊. + +### Vue compiler optimizations ⚙️ + +Automagically ✨ configure the Vue compiler to recognize the TresJS Components. This is because `` component creates a custom renderer for Vue, so we need to tell the outside Vue app to recognize the TresJS components. + +Without the module you need to configure the Vue compiler like this: + +```ts +export default defineNuxtConfig({ + vue: { + compilerOptions: { + isCustomElement: tag => (tag.startsWith('Tres') && tag !== 'TresCanvas') || tag === 'primitive', + }, + } +}) +``` + +See more [here](http://tresjs.org/guide/troubleshooting.html#failed-resolve-component-trescomponent-%F0%9F%A4%94) ## Share your work 🎨