初始化出来的项目语法用的ES3语法,如何改为ES6
老师,你好!看本节老师手法新建的项目,采用的是ES3语法,不知道是哪里出错了,请帮忙看看,谢谢!
package.json文件如下
{
"name": "text6",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "nodemon bin/www",
"dev": "./node_modules/.bin/nodemon bin/www",
"prd": "pm2 start bin/www",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"co": "^4.6.0",
"debug": "^2.6.3",
"jade": "~1.11.0",
"koa": "^1.4.0",
"koa-bodyparser": "^2.5.0",
"koa-json": "^1.1.3",
"koa-logger": "^1.3.1",
"koa-onerror": "^1.3.1",
"koa-router": "^5.4.0",
"koa-static": "^1.5.2",
"koa-views": "^3.1.0",
"koa2-cors": "^2.0.6",
"mongoose": "^6.3.3"
},
"devDependencies": {
"nodemon": "^1.8.1"
}
}
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星