【发布时间】:2017-09-04 13:59:40
【问题描述】:
当用作加载动态卡盘的函数时,vscode 似乎不支持 es6 导入。
webpack 2 + babel 实际上支持 import。
正常的 es6 导入或使用异步函数时没有问题。
在我集成 babel-eslint 之前,Eslint 也一直在报告错误。
我使用的是 vscode 1.9.1 版
我尝试使用 jsconfig.json 但它没有改变任何东西
{
// See http://go.microsoft.com/fwlink/?LinkId=759670
// for the documentation about the jsconfig.json format
"compilerOptions": {
"target": "es2017"
},
"exclude": [
"node_modules",
"bower_components",
"jspm_packages",
"tmp",
"temp"
]
}
【问题讨论】:
-
import表达式不是有效的 ES6。
标签: javascript ecmascript-6 visual-studio-code