survivejs / webpack-book

From apprentice to master (CC BY-NC-ND)
https://survivejs.com/webpack/
2.42k stars 319 forks source link

loader for jsx #41

Closed khyamay closed 9 years ago

khyamay commented 9 years ago

Hi there I have been following this cookbook, I know babel-loader is used for parsing jsx but in section 3.1 Loading CSS, on the the webpack.config.js loader for jsx is changed to 'jsx' from 'babel', and I get error when running npm run dev. But if i put 'babel', it work fine. Do I need to install jsx-loader but I guess we dont need that as we already have bable-loader doing same thing. Am i missing something or should be it 'babel' instead of 'jsx'. Thanks.

bebraw commented 9 years ago

Yeah, it's better to use Babel instead. I dropped jsx-loader references from the book as that's obsolete.

Note that you can find more up to date approach at my current book.

khyamay commented 9 years ago

ok thanks