我想用express转换我的自定义服务器文件以使用ES2017 +语法。我尝试了[这个问题] [1],但是我在build:next
脚本上遇到了一个错误:
{ Error: (client) ./src/client/pages/index.js
Module build failed: TypeError: programPath.hub.addHelper is not a function
我的.babelrc文件:
{
"env": {
"development": {
"presets": [
"next/babel"
]
},
"production": {
"presets": [
"next/babel",
[
"@babel/env",
{
"targets": {
"node": "8"
}
}
]
]
}
}
}