Tailwind CSS custom font not appearing in compiled CSS
Few mistakes that I see in your code are:
- The import statement should always be on the top of the file
- Your configuration should be like this
fontFamily:{
'Lato':{'Lato', 'sans-serif'}
}
-
You should use the css rules to specify as mentioned in google fonts.
-
Your import statement has 3 fonts. If you are only using Lato, remove the others and configure them properly for your own better understanding.
-
We should generally rebuild our css file, if you have done major changes. Rebuilding is not necessary in v.2. Using :
npm build YOUR_FILE.css
and restarting dev server should work. No need of creating another output file.