react-webpack-generators / generator-react-webpack

Yeoman generator for ReactJS and Webpack
http://newtriks.com/2013/12/31/automating-react-with-yeoman-and-grunt/
MIT License
2.88k stars 355 forks source link

Cannot resolve module 'sass-loader': scss generator generates vanilla css file and is missing sass-loader dependency #293

Closed neilsarkar closed 7 years ago

neilsarkar commented 7 years ago

Steps to reproduce:

Select scss generator and postcss

foo_ _npm_ _yo_rvm_bin_path__users_neilsarkar__rvm_bin_term_program_apple_terminal_ _158x42 foo_ _-bash_ _158x42

Adding an scss file results in loading error

localhost_8000_webpack-dev-server_

Workaround

  1. Rename App.css to App.scss
  2. Change reference from App.css to App.scss in Main.js
  3. Install sass-loader
$ npm install --save-dev node-sass sass-loader
  1. Restart webpack server with npm start
oktalk commented 7 years ago

I couldn't get your workaround to work. We need a fix for this.

neilsarkar commented 7 years ago

forked to inspect and this appears to be fixed on master. closing.