Original code:
test: /(\.jsx|\.js)$/,
loaders:["babel-loader","eslint-loader"] ,
options:{
cacheDirectory:true
},
exclude: /node_modules/,
Error: error:options.query cannot be used with loaders
as follows:
solve:
test: /(\.jsx|\.js)$/,
use:[
{loader:"eslint-loader"},
{
loader:"babel-loader",
options:{//options、queryCannot be used with loader arrays
cacheDirectory:true//Use cache to improve performance and babel is slow
},
}
],
exclude: /node_modules/,