I wanted to use the import of es6, but the browser reported an error index.js:1 Uncaught SyntaxError: Unexpected token import. Later, I checked on the Internet and said that babel was missing. Then I installed babel according to Ruan Yifeng's tutorial, but ran the code. Still reporting the same error
This is the entire directory structure
This is html
This is index.js
This is show.js
This is the configuration file
Which master can help me take a look
http://babeljs.cn/docs/setup/...
Execute to get the compiled js. Babel is usually used with automated tools. Manual compilation can be used when learning, and later used with gulp or webpack