dearrrfish/preprocess-loader

DeprecationWarning: loaderUtils.parseQuery() received a non-string value

Closed this issue · 4 comments

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

This warning can be triggered by passing the options object which contains a function to loader.

Getting the same warning, just using

test: /.(js|jsx)$/,
exclude: /node_modules/,
use: [{
loader: 'babel-loader'
},
{
loader: 'preprocess-loader',
options: {MOCK: isMock ? true : undefined}
}]

Indeed, just using options is sufficient to trigger this.

@dearrrfish Thanks for updating. Could you also update the npm module? And we could make it a 0.2.1 :-)

https://www.npmjs.com/package/preprocess-loader

Fixed in #7 and published new release of v0.2.1.