在VSCode中构建typescript时,我得到以下错误:
错误输出:只支持'amd‘和’TS6082‘模块以及--out。
我的设置如下:
tsconfig.json
{
"compilerOptions": {
"target": "ES5",
"module": "commonjs",
"out": "current/game.js",
"removeComments": true,
"sourceMap": false
}
}
.vscode/tasks.json:
{
"version": "0.1.0",
// The command is tsc. Assumes that tsc has been installed using npm install -g typescript
"command": "tsc",
// The command is a shell script
"isShellCommand": true,
// Show the output window only if unrecognized errors occur.
"showOutput": "silent",
// args is the HelloWorld program to compile.
"args": [],
// use the standard tsc problem matcher to find compile problems
// in the output.
"problemMatcher": "$tsc"
}
尽管出现了错误,但game.js文件仍能正常创建和运行。
有没有人对这个错误有什么想法?
发布于 2016-03-13 06:00:21
这是它所说的意思。你不能使用--out
/--outFile
来捆绑Node.js/CommonJS的模块,因为CommonJS没有捆绑格式。请不要对CommonJS使用该选项,将为每个输入TS模块文件发出相应JS文件。
https://stackoverflow.com/questions/35963346
复制相似问题