Dish chicken posing front-end back-end write vue page, run the debugger as usual, run npm run build when it came to a big Error, as shown:
google programs no solution, turned out to be ourselves dug a pit.
Resolution process:
1.Error in xxx.js from UglifyJs search result Es6 not compile the reason for the Es5
2.Invalid assignment [./axios/fetch.js:6,0] indicate a problem in the sixth line fetch.js, as:
3. The problem arises in the object Promise
4. recruited online solutions
4.1 added babel-preset-es2015 plug-in processing compiler issues $ npm install --save babel-preset- es2015
4.2 Modification webpack.base.conf.js file, added [options: {presets: [ 'es2015']}, as shown in FIG]:
4.3 .babelrc modify files, adding [ "presets": [ "es2015"]], as shown:
5. I thought you're done, run $ npm run build, error again
6. ten thousand useless words is omitted here, write your own project structure results in this scenario is not processed, as shown:
I 7.axios request frame package placed outside src, modify webpack.base.conf.js file again, as shown:
8. At this point processing is complete, a successful package