Yamakasinge
Yamakasinge
NNuxt
Created by Yamakasinge on 2/13/2023 in #❓・help
How to get project directory in nuxt kit ?
Okay this was the solution : On the nuxt module : nuxt.options.alias['mylib-styles'] = await resolvePath('~~/node_modules/mylib/styles) And in the scss file : @import "mylib-styles/mixins.scss";
15 replies
NNuxt
Created by Yamakasinge on 2/13/2023 in #❓・help
How to get project directory in nuxt kit ?
Okay I think I found the issue. I am trying to create a nuxt module 'mylib-nuxt'. I want 'mylib-nuxt' to expose 'mylib-styles' as an alias to 'mylib/styles/*.scss'. The issue comes from the resolvePath('mylib/styles') which resolve to mylib/dist/node_modules/mylib. I want the dist part away. Maybe I should just use resolvePath('../mylib/styles') ?
15 replies
NNuxt
Created by Yamakasinge on 2/13/2023 in #❓・help
How to get project directory in nuxt kit ?
If I try to import the scss file in a ts file, it doesn't resolve import as well. I think there is something wrong with my configuration.
15 replies
NNuxt
Created by Yamakasinge on 2/13/2023 in #❓・help
How to get project directory in nuxt kit ?
In the tsconfig.json file generated by nuxt it seems good. But sass doesn't seem to resolve at all
15 replies
NNuxt
Created by Yamakasinge on 2/13/2023 in #❓・help
How to get project directory in nuxt kit ?
This seems to work pretty well with resolvePath('mylib'). However I am using sass and it cannot find import : @import '~mylib/mystyle.scss' I am doing thing right, or for sass i need something else ?
15 replies