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/,
Read More:
- [Solved] Postcss Error: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
- How to Solve Error: RuntimeError: all tensors must be on devices[0]
- How to Solve Import antd Error: Module build failed
- How to Solve RemoveError: setuptools is a dependency of conda and cannot be removed from conda
- How to Solve QT Error: The build directory needs to be at the same level as the source directory.
- How to Solve VMware Workstation Error: This virtual machine appears to be in use.
- How to Solve Error: java.io.IOException: Resource [classpath:shiro.ini] could not be found.
- How to Solve Error: Module did not self-register
- How to Solve brew ERROR in `initialize‘: Version value must be a string; got a NilClass ()
- Template cannot be rendered due to the joint query of populate in mongoose: syntax error: unexpected token r in JSON at position 0
- Cmake Setting Support C++11 This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options
- [Solved] swiper Error: The requested module ‘react’ is expected to be of type CommonJS, which does not support named exports. CommonJS modules can be imported by importing the default export
- Vue require Error: node_modules/babel-loader/lib
- [Solved] webpack.config.js configuration encountered Error: Cannot find module’@babel/core’&&Cannot find module’@babel/plugin-transform-react-jsx’
- How to Solve Webpack CacheGroups Error
- Proguard Packaging Error: You have to specify ‘-keep‘ options if you want to write out kept elements with ‘-print
- How to Solve Error: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]
- [vite] Internal server error:options.devServer.transformWidthEsBuild is not a function…
- How to Solve Springmvc Error: org.springframework.web.servlet.DispatcherServlet
- How to Solve ceph-deploy Error (Three Errors)