Create alias for css Imports

Asked

Viewed 23 times

0

I have a React project that uses typescript and would like to have some way to import css without putting the whole css site path.

I would like to avoid such import time:

@import '../../../../shared/assets/src/assets/fonts/fonts.css'

  • see if this can help you https://stackoverflow.com/questions/64502855/vite-import-css-with-alias-in-maints

1 answer

0

That package fix it, use the package.json to configure aliases for any folder.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.