DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56 parseQuery() will be replaced with getOptions() in the next major version of loader-utils.

After upgrading to Webpack 4 you might be getting above warning. This error is not related to Webpack but it is related to one of the loaders it is using. Question is which one though…

Tracking the problematic loader

const publicPath = 'public';

const os = require('os');

const merge = require('webpack-merge');

const parts = require('./webpack.parts');

const PATHS = {

app: __dirname,

build: `${__dirname}/${publicPath}`,

fixedPath: '/'

}; process.traceDeprecation = true;

const commonConfig = merge([

parts.loadAntD(),

parts.loadLodashPlugin(),

parts.loadResolver(),

parts.loadSvgs({exclude: /node_modules/ }),

parts.loadMds({exclude: /node_modules/ }),

parts.loadIcos({exclude: /node_modules/ })

]);

Just like above code , simply add

process.traceDeprecation = true;

to your webpack.config file and run a build. You will now get a stack trace of the problem loader.

In my case

"react-svg-loader": "^1.1.1",

was the problem. After checking plugins Github Issues page, I figured out that the latest version had a fix. After upgrading to the latest version the warning went away.

Good luck,