In this tutorial series, you’ll be provided with a practical introduction to how Next.js can help you build web applications.
Brought to you by @dan-auth0
In this tutorial series, you’ll be provided with a practical introduction to how Next.js can help you build web applications.
Brought to you by @dan-auth0
Let us know if you have any questions regarding that!
Hi team,
I am applied your strategies on my project, I implemented layout directory then created layout.js and want to import Layout.scss but it’s generating issue as:
index.js:1 ./components/layout/layout.scss
Global CSS cannot be imported from files other than your Custom . Please move all global CSS imports to pages/_app.js.
Read more: css-global | Next.js
Location: components/layout/header.js
any idea how it will resolve?
Hey there @Akshay-pal!
I’m sure @dan-auth0 will be able to look at it once he’s online!
Howdy, Akshay! I can look into this some time this week. I wonder if it could be related to the version of Next.js that you are using. What version are you on?
@Akshay-pal try using SCSS modules. Current Next versions only allow you to import module styles into components. Check out this section of the Next.js docs on CSS Modules (and SCSS styles is right below that)
Thank you for sharing this approach, Jonathan Akshay, let me know if that works, please