json [es6 express with babel]设置env与异步支持等#babel #express
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json [es6 express with babel]设置env与异步支持等#babel #express相关的知识,希望对你有一定的参考价值。
{
"name": "es6-starter",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"babel-node": "babel-node --presets=env",
"start": "clear && nodemon --exec npm run babel-node ./src/index.js --inspect",
"build": "rm -rf dist/ && npm run build:src",
"build:src": "babel src/ --out-dir=dist --source-maps",
"watch": "npm run build:src --watch"
},
"author": "",
"license": "ISC",
"dependencies": {
"apollo-engine": "^1.1.2",
"apollo-errors": "^1.9.0",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.1",
"chalk": "^2.4.1",
"date-fns": "^1.30.1",
"dotenv": "^6.2.0",
"graphql-yoga": "^1.16.9",
"md5": "^2.2.1",
"mongoose": "^5.4.0",
"nodemon": "^1.17.2",
"shortid": "^2.2.14"
},
"babel": {
"presets": [
"env"
],
"plugins": [
"transform-runtime",
"transform-object-rest-spread",
"graphql-tag"
],
"sourceMaps": true,
"retainLines": true
},
"devDependencies": {
"babel-plugin-graphql-tag": "^1.6.0",
"babel-plugin-import-graphql": "^2.6.2"
}
}
以上是关于json [es6 express with babel]设置env与异步支持等#babel #express的主要内容,如果未能解决你的问题,请参考以下文章
如何在 ES6 中配置 express 路由器?
ES6 实战项目构建 ES6+glup+express
如何在 Express 中修复这个 ES6 承诺链?
Heroku无法运行节点ES6代码
使用 ES6 import + export 关键字和 Babel 导入/导出 Express 路由器
[Express] Upload Files with Express