vue eslineerror: Parsing error: Unexpected token import

created at 08-24-2021 views: 39

An error is reported when the component is introduced asynchronously

Vue import error

Scenario: lazy loading of vue routing

1. Suspected reason: eslint verification is before Babel parsing 

My final solution: add configuration in the eslint configuration file (.eslintrc.js)

"parserOptions": {
  "parser": "babel-eslint"
},

parserOptions

created at:08-24-2021
edited at: 08-24-2021: