How can i load sass files on nuxt with sass-loader ?

github logo ・1 min read

I intend loading bulma sass files from node modules into my components on nuxtjs but I am not getting any lead way. After installing both node-sass and sass-loader (coupled with the several hours I have spent trying to set them up on nuxt.config.js with zero success) I have really hit a dead end here guys, please help me.

twitter logo DISCUSS (5)
markdown guide
 

Is this a fresh project you are just getting started on?
If it is, I would recommend just using create-nuxt-app, which can bundle bulma for you out of the box.

If you already have some work done, then the next step would be to include bulma in the nuxt.config.js as you mentioned. To do that, take a look at their docs on css configuration here: nuxtjs.org/api/configuration-css

If this still isn't working, something might be off with your configuration of nuxt itself.

 

Wow, several hours of neck pain and headaches which would have been avoided if i had just done this

module.exports={
 css: ['bulma','@/assets/custom.scss']
}

Instead of

module.exports={
 css: ['~bulma/bulma','@/assets/custom.scss']
}

Thanks a lot, Nathan. You are a life saver.

 
 

Could you post your nuxt.config.js file? Just to get a better idea of what you've done so far.

 

Thanks Lynne. The problem has been solved with help from Nathan Bland

Classic DEV Post from Sep 20 '18

Thoughts on Dashboard Design

there are some simple things you can do to make the message clearer and quicker for the user to understand.

Sylvester Nkeze profile image
I am a simple man. I see Coldplay, Game of Thrones or Beautiful UI, I click