LitElement 我的 tsconfig.json 的以下文档如下所示:
{
"compilerOptions": {
"target": "ES2017",
"module": "ES2017",
"moduleResolution": "node",
"experimentalDecorators": true
},
"include": [
"src/*"
]
}
我看到一条错误消息
TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'esnext'.
最佳答案
这是一个bug in the LitElement docs 。有错误告诉你出了什么问题。 Typescript module
不支持 ES2017
作为值。您应该将其更改为 es2015
或 esnext
。
关于javascript - 将模块设置为 ES2017 时 tsconfig 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54801663/