swc-project / swc-node

Faster ts-node without typecheck
MIT License
1.72k stars 71 forks source link

Targets don't align with SWC documentation #660

Open maschwenk opened 2 years ago

maschwenk commented 2 years ago

I'm trying to pass

transformSync(code, filename, {
    target: 'node'
})

to @swc-node/core 1.8.2 and it seems to reject the target

    unknown variant `node`, expected one of `es3`, `es5`, `es2015`, `es2016`, `es2017`, `es2018`, `es2019`, `es2020`, `es2021`, `es2022` at line 1 column 439

which is weird because https://swc.rs/docs/configuration/supported-browsers#targets seems to make it clear that node is an option. I've contributed to this repo before so happy to help, but curious if you know what's going on?