Skip to content

Commit

Permalink
Remove deprecation warning
Browse files Browse the repository at this point in the history
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: webpack/loader-utils#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**
  • Loading branch information
NickNaso authored Mar 11, 2017
1 parent 5fc24de commit d3efccc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions webpack2/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ const webpackCommon = {
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
options: {
presets: ['es2015']
}
loader: 'babel-loader?presets[]=es2015'
}
]
},
Expand All @@ -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'
})
}
]
Expand Down

0 comments on commit d3efccc

Please sign in to comment.