How to properly lazy load the nuxt-monaco-editor module?
Original issue: https://github.com/e-chan1007/nuxt-monaco-editor/issues/71
---
In dev mode the module is huge, more than 50.000 kb, split into a lot of requests. How to properly lazy load Monaco?
Even pages that do not load it, are still loading it.
In production the bundle is much smaller, but still loading in pages that do not use it.
I tried using the hydration strategies here: https://nuxt.com/docs/4.x/guide/directory-structure/app/components#hydration-strategies
Wrapped in
The page is only visible after loading the module, which takes a long time.
---
For context, I'm using the module in a Nuxt Layer, running
---
In dev mode the module is huge, more than 50.000 kb, split into a lot of requests. How to properly lazy load Monaco?
Even pages that do not load it, are still loading it.
In production the bundle is much smaller, but still loading in pages that do not use it.
I tried using the hydration strategies here: https://nuxt.com/docs/4.x/guide/directory-structure/app/components#hydration-strategies
Wrapped in
<ClientOnly>, with lazy prefix and a v-if:The page is only visible after loading the module, which takes a long time.
---
For context, I'm using the module in a Nuxt Layer, running
build for production.GitHub
In dev mode the module is huge, more than 50.000 kb, split into a lot of requests. How to properly lazy load Monaco? Even pages that do not load it, are still loading it. In production the bundle i...
Nuxt
The components/ directory is where you put all your Vue components.

