You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a pretty strange decision to make 'app' folder and use it for module configuration storage.
I found that this path is hardcoded in
~/node_modules/nuxt-multi-cache/dist/module.mjs line:147
Can I ask for a new feature where I could set the path of multiCache.serverOptions storage?
Because I wish to move whole module, with config to npm local package and use it as nuxt layer in multiply projects
The text was updated successfully, but these errors were encountered:
The decision was made based on how other such things are implemented, for example the app/router.options.ts file from Nuxt itself. The problem is that it's not really module configuration, but module "behaviour". For module authors there is no easy way to allow module consumers to define non-stringable module configuration: Everything in nuxt.config.ts is only available at build time. The only way this can be done is using a separate file, which is then "magically" included/inlined at build time.
In your case, what you could do is define the runtime options as usual using defineMultiCacheOptions in your layer folder. Then in your project where you use said layer, you create a app/multiCache.serverOptions.ts where you import the config from your layer and export it again.
In Nuxt 4 the directory structure will change anyway (see nuxt/nuxt#26444) and the app folder will become the "main" folder. I suspect this will require adjustments to this module. I will keep your use case in mind and see if it's possible to provide a solution that would allow such a layer based "inheritance".
It's a pretty strange decision to make 'app' folder and use it for module configuration storage.
I found that this path is hardcoded in
~/node_modules/nuxt-multi-cache/dist/module.mjs line:147
Can I ask for a new feature where I could set the path of multiCache.serverOptions storage?
Because I wish to move whole module, with config to npm local package and use it as nuxt layer in multiply projects
The text was updated successfully, but these errors were encountered: