register icon indicating copy to clipboard operation
register copied to clipboard

Use @swc-node/register instead

Results 12 register issues
Sort by recently updated
recently updated
newest added

If I understand correctly `swc-register` will at the moment use `.swcrc` for options. Could we have ability to pass custom options in code API similar to `@babel/register`: https://babeljs.io/docs/en/babel-register/#specifying-options

After upgrading from 0.1.7 to 0.1.8 tests in our project stopped working. On further inspection I noticed that this was due to change in how ignoring node_modules is implemented. For...

Trying to run `node -r @swc/register test.ts` throws the following: ``` ❯ node -r @swc/register test.ts internal/process/esm_loader.js:74 internalBinding('errors').triggerUncaughtException( ^ TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for test.ts at Loader.defaultGetFormat [as...

https://github.com/swc-project/register/blob/377bad1f81cc590b95cb207c0524e95718b4e065/src/node.ts#L64 `source-map-support` doesn't seem to work with `inline` maps (needs a require hook - https://github.com/evanw/node-source-map-support#options). To get accurate maps, it needs to be `true` in swc.

`source-map-support` should not be called more than once it can cause bugs. See: https://github.com/evanw/node-source-map-support/issues/200. Mainly relates to multiple versions, but still, wasted cycles. https://github.com/swc-project/register/blob/377bad1f81cc590b95cb207c0524e95718b4e065/src/node.ts#L69

I'm not sure if this should be supported but it'd great to be able to import a TypeScript file with `.js` specifier in a TypeScript file, like so: ```ts //...

When I try to import a `.ts` file from an ESM entry-point I get this error: ``` TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /xxx/src/cli.ts at new NodeError (node:internal/errors:371:5) at...

Hey, I'm trying to use this library as a replacement for `@babel/register`. I've encountered an issue where source maps are not applied on stack traces ([reproducing repository](https://github.com/idan-at/swc-registger-sourcemap-bug)). Can you please...

Hello! When I try to run my typescript file which contains child_process.fork using swc-node I get the following error: ``` //main.ts child_process.fork(__dirname + '/testsRunner/testsRunner.js', args, {cwd: process.cwd()}) ``` ``` internal/modules/cjs/loader.js:1023...