【发布时间】:2017-01-14 22:14:18
【问题描述】:
我有一个 Angular2/Typescript 项目,它有以下 tsconfig.js 文件:
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noImplicitAny": false,
"outDir": "./build"
},
"exclude": [
"node_modules",
"typings"
],
"filesGlob": [
"**/*.ts",
"typings/main",
"typings/index.d.ts"
]
}
看...我正在尝试“摆脱”在我的打字稿文件旁边生成的烦人的 *.js 和 *.map 文件。您可以看到我添加了“outDir”配置,但它只将 js/map 文件复制到 build 文件夹,将 *.js 文件的副本留在与 ts 相同的文件夹中。
这里是否缺少配置?
Ionic2 内置了这个“功能”。TS 文件会自动转译到构建文件夹(并打包...)。这可以通过“vanialla”打字稿环境来实现吗?
【问题讨论】:
标签: javascript angular typescript