I want to use an external .css file but It does not work. I have tried link rel="stylesheet" and @importing css in style tags but it does not work
1 Answer 1
for importing css file to your nuxt app open yout nuxt.config.js file and in css section add your css files like: css: ['~layouts/global.css'] – Ali Hosseini
Sign up to request clarification or add additional context in comments.
3 Comments
Patrick Hübl-Neschkudla
Hi @garbg - if a question was answered, please just use the "Answered" flag next to the correct answer instead of posting another "answer" :)
Garbg
There is no way to set a comment as an answer though
Patrick Hübl-Neschkudla
Ohh, sorry @Garbg - I didn't see that in the review queue. Instead, you could add the answer from the comment to your "own" answer, or (even better) tell (in this case) ali hosseini to move the comment :)
default
nuxt.config.jsfile and in css section add your css files like: ``` css: ['~layouts/global.css']```