Skip to content

Commit

Permalink
Add '-loader' suffix to webpack config (#722)
Browse files Browse the repository at this point in the history
When copy / pasting the webpack configuration given in the 'Testing' doc page, I end up with following error:
ERROR in Entry module not found: Error: Can't resolve 'babel' in '<...>'
BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders. You need to specify 'babel-loader' instead of 'babel'.
My version of webpack: 2.2.0-rc.3
Adding the '-loader' suffix fixed the problem.
Not sure though how safe it is to use 'babel-loader' instead of 'babel' with previous webpack versions...
  • Loading branch information
cedric25 authored and ktsn committed Mar 31, 2017
1 parent 489fe38 commit 84b4634
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/en/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ module.exports = {
loaders: [
{
test: /\.js$/,
loader: 'babel',
loader: 'babel-loader',
exclude: /node_modules/
}
]
Expand Down

0 comments on commit 84b4634

Please sign in to comment.