survivejs / webpack-book

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

Typo/bug in Building with Webpack/ 04 - Processing with Babel #127

Closed Velenir closed 7 years ago

Velenir commented 7 years ago

In Processing with Babel chapter webpack.parts.js includes:

use: 'babel-loader',

options: {/* ... */}

But running npm run build with this config throws Error: options/query provided without loader (use loader + options). It seems options property requires loader property to be present: either

loader: 'babel-loader',
options: {/* ... */}

or

use: [{
  loader: 'babel-loader',
  options: {/* ... *}
}]

Just use: 'babel-loader' without options works perfectly.

bebraw commented 7 years ago

Yeah, this should be fixed now. Just noticed it myself. Thanks for the heads up!