首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >除了--out,还支持'amd‘和'system’模块

除了--out,还支持'amd‘和'system’模块
EN

Stack Overflow用户
提问于 2016-03-13 05:09:27
回答 1查看 32.2K关注 0票数 56

在VSCode中构建typescript时,我得到以下错误:

错误输出:只支持'amd‘和’TS6082‘模块以及--out。

我的设置如下:

tsconfig.json

代码语言:javascript
复制
{
    "compilerOptions": {
        "target": "ES5",
        "module": "commonjs",
        "out": "current/game.js",
        "removeComments": true,
        "sourceMap": false
    }
}

.vscode/tasks.json:

代码语言:javascript
复制
{
    "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文件仍能正常创建和运行。

有没有人对这个错误有什么想法?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-03-13 06:00:21

这是它所说的意思。你不能使用--out/--outFile来捆绑Node.js/CommonJS的模块,因为CommonJS没有捆绑格式。请不要对CommonJS使用该选项,将为每个输入TS模块文件发出相应JS文件。

票数 44
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35963346

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档