nx/docs/angular/api-js/generators/convert-to-swc.md
Chau Tran 726877d103
feat(js): add SWC support (#7956)
* feat(js): add SWC support

chore(js): remove comment

fix(js): clean up typecheck after merge

fix(js): add tests to swc

* fix(js): adjust typecheck

* feat(js): add skipTypeCheck to library generator

* fix(js): use Promise.all()

* fix(js): pass in correct tsconfig path

* cleanup(js): remove comment code

* fix(js): use logger from devkit instead of console log

* fix(js): remove unintended exit log

* feat(js): add convert-to-swc generator to convert lib w/ tsc to swc

* fix(js): reexport print diagnostics
2021-12-15 12:23:50 -05:00

748 B

title description
@nrwl/js:convert-to-swc generator Convert a tsc library to swc

@nrwl/js:convert-to-swc

Convert a tsc library to swc

Usage

nx generate convert-to-swc ...
nx g swc ... # same

By default, Nx will search for convert-to-swc in the default collection provisioned in angular.json.

You can specify the collection explicitly as follows:

nx g @nrwl/js:convert-to-swc ...

Show what will be generated without writing to disk:

nx g convert-to-swc ... --dry-run

Examples

Convert libs/myapp/mylib to swc:

nx g swc mylib

Options

name (required)

Type: string

Library name

targets

Type: array

List of targets to convert