arefaslani / next-boilerplate

Minimal Next.js boilerplate
149 stars 21 forks source link

Load global external css generated from .scss #5

Closed 6foot7 closed 6 years ago

6foot7 commented 6 years ago

Hi, thank you for this awesome boilerplate. I am currently trying to generate a static global css file from .scss files in my styles folder (mainly a themed version bootstrap), that I then want to load via a link in the head in _document.js for example. No luck yet. Have you done this before and could you point me in the right direction for this?

arefaslani commented 6 years ago

Yes. We had Sass support in this boilerplate formerly. But then we moved to styled-components and we removed built-in sass support from the boilerplate. We had local scss files support earlier. Take a look at this commit. Also we had global scss support. Take a look at scripts section in our old package.json file. We had node-sass installed in our boilerplate. It was watching the global scss files in the bundles/scss directory and compile them in the static/css directory. Please feel free to ask more if you still have any problem :)

6foot7 commented 6 years ago

Awesome, thnx for your quick reply! I got it working!

I would like to use both, so import .scss file on component level and use it with