fago
fago
NNuxt
Created by Lars on 5/10/2025 in #❓・help
Using layers and (sub)domains.
Layers do not help with this. you can use multiple layers to compose one nuxt-app. Thus I'd make one nuxt-app per domain and one or multiple shared-layers for shared parts.
7 replies
NNuxt
Created by fago on 5/9/2025 in #❓・help
Render multiple component-previews as "islands" within a non-nuxt app
Multiapp does not really help me, since I'd have multiple nuxt instance of the same nuxt-build. So the app-ID would be all the same. Thus, I'd probably have to use iframes e.g. with srcDoc to isolate the multiple nuxt apps. But given that, I figured having one nuxt-app per preview-components is probably not the best idea resource-wise anyway. It would probably get tot resource hungry when there are ~100+ components on a page. Thus, I'm considering a new approach now: A single nuxt app that dynamically creates teleports for preview-Components.
9 replies
NNuxt
Created by fago on 5/9/2025 in #❓・help
Render multiple component-previews as "islands" within a non-nuxt app
found https://github.com/nuxt/nuxt/issues/21635 - wondering whether this is even possible atm 😕
9 replies
NNuxt
Created by fago on 5/9/2025 in #❓・help
Render multiple component-previews as "islands" within a non-nuxt app
I've tried this, but I've run into a problem: The nuxt-import protection disallows importing nuxt in my custom entry:
[ nuxi 21:59:27] ERROR Nuxt Build Error: [commonjs--resolver] [plugin nuxt:import-protection] nuxt, or nuxt-nightly cannot be imported directly in the Vue part of your app. Instead, import runtime Nuxt composables from #app or #imports. [importing nuxt from ../node_modules/nuxt]

at getRollupError (node_modules/rollup/dist/es/shared/parseAst.js:397:41)
at error (node_modules/rollup/dist/es/shared/parseAst.js:393:42)
[ nuxi 21:59:27] ERROR Nuxt Build Error: [commonjs--resolver] [plugin nuxt:import-protection] nuxt, or nuxt-nightly cannot be imported directly in the Vue part of your app. Instead, import runtime Nuxt composables from #app or #imports. [importing nuxt from ../node_modules/nuxt]

at getRollupError (node_modules/rollup/dist/es/shared/parseAst.js:397:41)
at error (node_modules/rollup/dist/es/shared/parseAst.js:393:42)
9 replies
NNuxt
Created by fago on 5/9/2025 in #❓・help
Render multiple component-previews as "islands" within a non-nuxt app
I was wondering whether it would work to use nuxt build hooks to expose a custom entry.js that helps with this use-case?
9 replies