importing a file with an alias in Nuxt 3 and Stylus

49 Views Asked by At

I'm having trouble importing a file with an alias in Nuxt 3 and Stylus. Specifically, when I try to import the file with the following code:

@import '~/assets/css/breakpoints.styl'

I receive the error message

failed to locate @import file ~/assets/css/breakpoints.styl

I've tried different types of aliases and import methods, such as:

- @import '~/assets/css/breakpoints.styl'
- @import '~assets/css/breakpoints.styl'
- @import '~@/assets/css/breakpoints.styl'

I've also created a custom alias and tried importing the file with the same import syntaxes, but I still receive the same error message.

I'm not sure what else to try at this point, so any help would be greatly appreciated. Thank you!

0

There are 0 best solutions below