-
Notifications
You must be signed in to change notification settings - Fork 9
Docs: update for PR #13/#14 #15
base: master
Are you sure you want to change the base?
Conversation
```js | ||
require("@swc/register")({ | ||
extensions: [], | ||
ignore: [], | ||
only: [], | ||
// And swc configuration | ||
jsc: {}, | ||
env: {} | ||
}); | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the automatic hook is being removed in #14, @swc/register
always requires an option. It is to match the behavior of @babel/register
.
```bash | ||
swc-node <filename> | ||
node -r '@swc/register' <filename> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the automatic hook is being removed in #14, node -r '@swc/register'
is no longer supported.
Babel has a dedicated package @babel/node
(node -r @swc/node
). swc should use a dedicated package, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the automatic hook is being removed in #14, node -r '@swc/register' is no longer supported.
Babel has a dedicated package @babel/node (node -r @swc/node). swc should use a dedicated package, too.
This does mean we need a custom CLI?
While reading again before merging into the main repository, I found that this package would be useless.
Yeah, I think I should move it to swc main repository. Thank you! |
Since @swc/register has depdency for version 1.3.78 And another versions fall in error + This would be moved (#https://github.com/swc-project/register/pull/15\#issuecomment-1000662003)
No description provided.