Page code prompts error Uncaught SyntaxError: Unexpected identifier

when the project is developed locally, the: npm run dev does not report an error, and the page opens normally, but there is an error in the Sources time code in the browser. What is the situation?
clipboard.png

clipboard.png

clipboard.png

whatever is introduced is the first line report this error
import Vue from "vue"
Uncaught SyntaxError: Unexpected identifier

Illegal characters appear in

. Remove the semicolon


browsers do not support ES6 syntax.

have you packed yet? Whether webpack configuration


so how to solve it.


I also met the landlord. How did I solve it?


the .babelrc file should not be configured, resulting in a higher version of ES code not being properly converted to a lower version.

Menu