怎讓node支持如下特性:babel配置如下:{ "presets": ["@babel/preset-env", "@babel/preset-react"], "plugins": [
["@babel/plugin-proposal-class-properties", { "loose": true }],
[ "@babel/plugin-transform-runtime",
{ "corejs": false, "helpers": true, "regenerator": true, "useESModules": false
}
],
]
}同樣的特性和babel配置我在react中是可以使用的,但是node中直接報錯:請問這個怎么解決??node中是否能使用babel?畢竟babel都是編譯后在運行的。node和瀏覽其中的babel工作原理是否相同?
- 1 回答
- 0 關(guān)注
- 550 瀏覽
添加回答
舉報
0/150
提交
取消