swc-node icon indicating copy to clipboard operation
swc-node copied to clipboard

Targets don't align with SWC documentation

Open maschwenk opened this issue 3 years ago • 0 comments

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?

maschwenk avatar Jun 09 '22 23:06 maschwenk