@nx/js:tsc
Builds using TypeScript.
Options can be configured in project.json
when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/reference/project-configuration#targets.
Builds using TypeScript.
Options can be configured in project.json
when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/reference/project-configuration#targets.
@nx/js:tsc
can run the TypeScript Transformers by using the transformers
option.
1{
2 "build": {
3 "executor": "@nx/js:tsc",
4 "options": {
5 "outputPath": "dist/libs/ts-lib",
6 "main": "libs/ts-lib/src/index.ts",
7 "tsConfig": "libs/ts-lib/tsconfig.lib.json",
8 "assets": ["libs/ts-lib/*.md"],
9 "transformers": [
10 "@nestjs/swagger/plugin",
11 {
12 "name": "@automapper/classes/transformer-plugin",
13 "options": {}
14 }
15 ]
16 }
17 }
18}
19
The name of the main entry-point file.
The output path of the generated files.
The path to the Typescript configuration file.
Additional entry-points to add to exports field in the package.json file. Ignored when generatePackageJson
is set to false
.
false
Update the output package.json file's 'exports' field. This field is used by Node and bundlers. Ignored when generatePackageJson
is set to false
.
true
Remove previous output before build.
[build]
List of target names that annotate a build target for a project
true
Generate package.json file in the output folder.
The path to the main file relative to the outputPath
Sets the rootDir for TypeScript compilation. When not defined, it uses the root of project.
false
Enable re-building when files change.
false
Generate a lockfile (e.g. package-lock.json) that matches the workspace lockfile to ensure package versions match. Ignored when generatePackageJson
is set to false
.
A list projects to be treated as external. This feature is experimental
Make sure all dependencies are buildable by running nx g @nx/js:setup-build
. This option will be removed in Nx 20.
Watch the replays of exciting talks on developer tooling and monorepos! Catch all the insightful presentations from the event on our YouTube channel.