Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Docs: update for PR #14
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Dec 23, 2021
1 parent d9a617a commit faa8596
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ yarn add --dev @swc/core @swc/register
```

### Usage
```bash
require("@swc/register");
```

All subsequent files required by node will be transformed by swc. You can also
call @swc/register directly from command line.

```bash
swc-node <filename>
node -r '@swc/register' <filename>
```js
require("@swc/register")({
extensions: [],
ignore: [],
only: [],
// And swc configuration
jsc: {},
env: {}
});
```

All subsequent files required by node will be transformed by swc.

&nbsp;

--------
Expand Down

0 comments on commit faa8596

Please sign in to comment.