It's evident from the images provided that the font used in my Production Build and Development Build for my Next.js webpage is different. Upon running npm run build
and npm start
to test the production build, the Montserrat Font disappears from the webpage.
Below is how I imported the font into my globals.scss
file. Please let me know if there's an error in my approach:
@tailwind base;
@tailwind components;
@tailwind utilities;
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&display=swap');
html,
body {
padding: 0;
margin: 0;
font-family: 'Montserrat', sans-serif;
background-color: hsl(265, 3%, 53%);
color: black;
&:before{
content:'';
content: "";
width: 100%;
height: 100vh;
}
}
Production Build Screenshot:
https://i.sstatic.net/STIIE.png
Development Build Screenshot: