Mobyr
Playground with hmr for a nuxt module which contains scss
in my module, I import style with "nuxt.options.css.push(resolve('./runtime/assets/index.css'))" and also "import('../assets/optionalStyle.css')" but these files are scss files compiled, and so I have problems when I try to launch a playground to test my module with hmr because it tells me that it can't find the css files, logical since the scss files are not compiled (and I don't think I want them to be compiled at that time to have hmr on the style too), how can I solve my problem?
6 replies
addImportsDir does work for types but doesn't work at runtime
I wanted that in my Nuxt module, the enums defined in the module are defined globally in the application, so I added "addImportsDir(resolve('./runtime/enums'))" in the setup function of defineNuxtModule, but although it works for types with typescript, in runtime I have errors like "ReferenceError: __unimport_MyEnum is not defined"
27 replies