Eslint-loader checks syntax

eslint

Note: only check the source code written by yourself, third-party libraries are not checked by setting the check rule: package.json set in eslintConfig ~

  "eslintConfig": {
    "extends": "airbnb-base"
  }
airbnb --> eslint-config-airbnb-base  eslint-plugin-import eslint
Copy the code

babel

Js compatibility processing: babel-loader@babel /core

  1. Basic JS compatibility handling –> @babel/preset-env problem: Only basic syntax can be converted, such as promise advanced syntax cannot be converted

  2. @babel/polyfill: I only want to solve part of the compatibility problem, but it is too big to introduce all the compatibility code

  3. If you need to do compatibility, do it: load on demand –> core-js