From d3efcccb4be7ce0df879c57221e2f5fc8a7af708 Mon Sep 17 00:00:00 2001 From: Nicola Del Gobbo Date: Sat, 11 Mar 2017 15:15:10 +0100 Subject: [PATCH] Remove deprecation warning When run build **loader-utils** issued this deprecation message: ``` loader option has been deprecated - replace with "use" (node:22316) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic ``` So based on **loader-utils** (See: https://github.com/webpack/loader-utils/issues/56) and **babel-loader** (See: https://github.com/babel/babel-loader#options) documentation. **options** have been removed as object and used query string instead. Updated **fallbackLoader** to **fallback** Updated **loader** to **use** --- webpack2/webpack.config.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/webpack2/webpack.config.js b/webpack2/webpack.config.js index 194d9be..0c73ff1 100644 --- a/webpack2/webpack.config.js +++ b/webpack2/webpack.config.js @@ -17,10 +17,7 @@ const webpackCommon = { exclude: /node_modules/, use: [ { - loader: 'babel-loader', - options: { - presets: ['es2015'] - } + loader: 'babel-loader?presets[]=es2015' } ] }, @@ -34,8 +31,8 @@ const webpackCommon = { test: /\.css$/, exclude: /node_modules/, use: ExtractTextPlugin.extract({ - fallbackLoader: 'style-loader', - loader: 'css-loader' + fallback: 'style-loader', + use: 'css-loader' }) } ]