@nrwl/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.
@nrwl/js:swc can inline non-buildable libraries by opt-in to Inlining mode with external option.
{
"build": {
"executor": "@nrwl/js:swc",
"options": {
"outputPath": "dist/libs/ts-lib",
"main": "libs/ts-lib/src/index.ts",
"tsConfig": "libs/ts-lib/tsconfig.lib.json",
"assets": ["libs/ts-lib/*.md"],
"external": "all"
}
}
}
npx nx build ts-lib --external=all
@nrwl/js:swc can also inline buildable libraries by setting external: 'none'
{
"build": {
"executor": "@nrwl/js:swc",
"options": {
"outputPath": "dist/libs/ts-lib",
"main": "libs/ts-lib/src/index.ts",
"tsConfig": "libs/ts-lib/tsconfig.lib.json",
"assets": ["libs/ts-lib/*.md"],
"external": "none"
}
}
}
npx nx build ts-lib --external=none
The name of the main entry-point file.
The output path of the generated files.
The path to the Typescript configuration file.
falseWhether to skip TypeScript type checking.
peerDependenciesdependencies, peerDependenciesWhen updateBuildableProjectDepsInPackageJson is true, this adds dependencies to either peerDependencies or dependencies.
trueRemove previous output before build.
A list projects to be treated as external. This feature is experimental
[build]List of target names that annotate a build target for a project
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).
trueWhether to update the buildable project dependencies in the build output package.json.
falseEnable re-building when files change.
falseGenerate a lockfile (e.g. yarn.lock) that matches the workspace lockfile to ensure package versions match.