@nx/js:swc
Builds using SWC.
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 SWC.
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:swc
can compile your code with a custom .swcrc
1{
2 "build": {
3 "executor": "@nx/js:swc",
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 "swcrc": "libs/ts-lib/.dev.swcrc"
10 },
11 "configurations": {
12 "production": {
13 "swcrc": "libs/ts-lib/.prod.swcrc"
14 }
15 }
16 }
17}
18
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.
false
Update the output package.json file's 'exports' field. This field is used by Node and bundles.
false
Whether to skip TypeScript type checking.
true
Remove previous output before build.
false
Include files that are ignored by .gitignore and .nxignore when copying assets. WARNING: Ignored files are not automatically considered when calculating the task hash. To ensure Nx tracks these files for caching, add them to your target's inputs using 'dependentTasksOutputs' or 'runtime' configuration.
The path to the SWC configuration file. Default: .swcrc
[./src/**/.*.spec.ts$,./**/.*.spec.ts$,./src/**/jest-setup.ts$,./**/jest-setup.ts$,./**/.*.js$]
List of SWC Glob/Regex to be excluded from compilation (https://swc.rs/docs/configuration/compilation#exclude).
false
Remove leading directory from output (e.g. src). See: https://swc.rs/docs/usage/cli#--strip-leading-paths
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.