DEV Community

Gündoğdu Yakıcı
Gündoğdu Yakıcı

Posted on

How to add css from React folder?

Hello,

I'm working on next JS project. I want to add my own css file but I get error not found file in console. Can you help me ?

code
< link href="../assets/css/style.css" type="text/css" rel="stylesheet" />

File Path
assets
~ css
~ style.css
components
~ Layout.js
node_modules
pages

Top comments (2)

Collapse
 
dance2die profile image
Sung M. Kim

Would you happened to have a runnable code (CodeSandBox or StackBlitz) or a repo of code?

Collapse
 
luxer066 profile image
Lucas Canavesio

I think you need to add the type folder and next.config.js const withCSS = require("@zeit/next-css").