- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是 tsconfig.json
配置的新手,但我只是想像它应该的那样将我的 src 目录编译为编译的 javascript,但它只是没有创建 outDir
包含编译代码的文件夹。
这是我的tsconfig.json
:
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"target": "es2017",
"skipLibCheck": true,
"noImplicitAny": true,
"noEmit": true,
"moduleResolution": "node",
"sourceMap": true,
"outDir": "dist",
"baseUrl": ".",
"jsx": "react",
"paths": {
"MyApplicationTypes" : ["@types/MyApplicationTypes/index.d.ts"],
"*": [
"node_modules/*"
]
},
"typeRoots" : ["@types"]
},
"include": [
"server/**/*",
"client/**/*"
],
"exclude" : [
"./client/dist",
"./client/.cache",
"./dist",
"./.cache"
]
}
我的 npm run build
命令只是简单的 tsc
,它运行并完成没有任何错误 或任何其他输出。
dist/
没有创建,即使我手动创建文件夹,它仍然是空的。这是怎么回事?!
我的文件夹结构非常简单,包含服务器和客户端:
- project
- client
- index.html
- index.tsx
... etc
- server
- index.ts
... etc
有什么理由吗?我的 tsconfig 非常简单
最佳答案
关于typescript - tsc 命令没有编译到 outDir,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64284042/
我在 Visual Studio 2013 中有一个 C++/CLI dll 项目,我试图在其中更改输出目录。我已将项目属性 > 常规中的“输出目录”设置设置为 $(SolutionDir)Stage
我是 tsconfig.json 配置的新手,但我只是想像它应该的那样将我的 src 目录编译为编译的 javascript,但它只是没有创建 outDir 包含编译代码的文件夹。 这是我的tscon
我正在查看我的 Visual Studio 项目的属性并看到以下内容: $(OutDir)\$(ProjectName).exe 我很好奇visual studio如何知道outdir的值(value
我正在尝试为 OutDir 设置默认位置和 IntDir供解决方案中的所有项目使用。如:$(SolutionDir)bld\$(Platform)\$(ProjectName)\$(Configura
我遇到一个问题,编译器提示以下内容:无法写入文件“path/file.json”,因为它会覆盖输入文件。我做了一些挖掘,大多数解决方案建议使用 outDir 来修复它。该解决方案工作正常,但我不确定要
使用新的 SDK 样式 csproj 格式时,可以使用 以分号分隔的目标框架列表的元素,以为其构建项目。 这会在构建输出文件夹中为每个目标框架生成一个子文件夹: 但是,当在 msbuild 命令行上传
使用新的 SDK 样式 csproj 格式时,可以使用 以分号分隔的目标框架列表的元素,以为其构建项目。 这会在构建输出文件夹中为每个目标框架生成一个子文件夹: 但是,当在 msbuild 命令行上传
我有一个小项目,我在其中使用 CMake 系统从 C++ 文件创建一个 Python 模块。在 CMakeLists.txt 文件中,我按如下方式集成了 Swig: # only the Swig p
我正在尝试将 TypeScript 与 React Native 结合使用。 这是我的tsconfig.json: { "compilerOptions": { "target
我有以下项目结构: root -src -lib index.ts -example test.ts 我想将 outDir 设置为根文件夹 /,这样我就可以
我有以下 tsconfig.json,我想将转译后的输出放在 build/ 文件夹中 { "compileOptions": { "module": "amd",
我想使用 TypeScript 3.1 中的项目引用功能。我项目编译后的目录结构原来是这样的: . ├── A │ ├── a.ts │ ├── dist │ │ ├── A │
有谁知道如何配置 Erlang emacs 模式,以便编译缓冲区 [C-c C-k] 将束文件写入 ebin 目录而不是当前目录? 谢谢! 最佳答案 你可能想看看 Erlang 问题邮件列表上的这个线
我对非 ts 模块(文本 Assets )有一个问题,它们没有按照 tsconfig.json 中的配置转移到 outDir(或者我做得不对)。 这是最简单的复制案例 // /src/main.ts
我有一个tsconfig.json,它指定了一个outDir。原因是我想将生成的 JavaScript 输出与 TypeScript 源分开。 所以: "compilerOptions": {
是否可以设置到不同磁盘驱动器的绝对路径,比如我在 D:\work\project\tsconfig.json 上工作,我希望它在 c:\work\release.js 中编译如果我写 "outDir"
我有一个简单的应用程序,有两个 .ts 文件,我使用以下 tsconfig.js 文件编译 { "compilerOptions": { "target": "ES5", "mod
在 package.json 中使用时,我似乎无法让 outDir 标志工作。目录结构非常简单:根级别的 tsconfig.json,以及一个 src/ 目录和一个 index.ts 文件以及代表其他
我刚刚完成了 Angular CLI Heroes 教程 here 。我已遵循所有教程并完成了 HTTP 教程。 关于 Angular 4 和 TypeScript 的所有精彩学习,但在整个类(cla
我正在尝试构建我的简单 npm 包,一切都很好。然而,当我尝试构建它时,它出了点问题。 我得到以下信息: - dist - package.json - src - inde
我是一名优秀的程序员,十分优秀!