typescript - Typescript 总是在根文件夹中创建 app.js
问题描述
我在 Microsoft typescript GitHub repo 上阅读了这个帖子
https://github.com/Microsoft/TypeScript/issues/10585
根据此处的建议,我编写了以下 tsconfig.json
{
"compilerOptions": {
"target": "es6",
"module": "system",
"lib": [
"dom",
"es6",
"dom.iterable",
"scripthost"
],
"sourceMap": true,
"outFile": "app.js",
"outDir": "dist",
"rootDir": "src",
"removeComments": true,
"noEmitOnError": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"esModuleInterop": true
},
"include":["src"],
"exclude": [
"node_modules",
"dist"
]
}
如您所见,我已经指定了上面线程所讨论的“包含”、“排除”元素。
> as a fix, either make the outDir another folder, specify a list of "files", "include" or "exclude"
但仍然当我这样做tsc --watch
或者tsc --build tsconfig.json --watch
它总是在根文件夹中创建app.js
and而不是在我配置的app.js.map
dist
我在那个线程中看不到什么?
解决方案
推荐阅读
- javascript - 反应引导不断显示工具提示
- sql - 将表名和值列表作为参数传递给 psycopg2 查询
- ruby-on-rails - 在 rails 的 devise-jwt 中查找 JWT 令牌的用户
- telegram - 深度链接到电报机器人
- python - 如果使用 python regex 找到特定字符串,则突出显示整行
- python - 为什么在 tensorflow 2 中使用 tf.GradientTape 进行训练与使用 fit API 进行训练有不同的行为?
- spring-kafka - 多个 KafkaListener 类可以监听同一个主题吗?
- excel - 如何通过 VBA 抓取整页源代码 - 单元格限制问题
- javascript - 可以验证网页上的多个表单的 JavaScript 函数
- laravel - 如何在 laravel 中创建 3 个级别的多租户功能