From d4f43391d43e525db605315b12a51f5986502bd3 Mon Sep 17 00:00:00 2001 From: Cedric Nicoloso Date: Fri, 31 Mar 2017 11:12:34 +1100 Subject: [PATCH] Add '-loader' suffix to webpack config 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... --- docs/en/testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/testing.md b/docs/en/testing.md index 9bb0e73ad..302d625b1 100644 --- a/docs/en/testing.md +++ b/docs/en/testing.md @@ -189,7 +189,7 @@ module.exports = { loaders: [ { test: /\.js$/, - loader: 'babel', + loader: 'babel-loader', exclude: /node_modules/ } ]