swc-project / swc-loader

Moved to https://github.com/swc-project/pkgs
MIT License
394 stars 29 forks source link

unknown variant `nodenext`, expected one of `commonjs`, `umd`, `amd`, `systemjs`, `es6` #57

Open ghost opened 2 years ago

ghost commented 2 years ago

When using swc I set module type to nodenext, however when I use the exact same setup with swc-loader, it seems that suddenly I can't select that option any more. It breaks with the unknown variant error above and says that I can only use commonjs, umd, amd, systemjs, es6, when swc allows you to use nodenext.

SWC recently added support for nodenext and things like es2022. I believe this issue might be simply because swc-loader is using an old "@swc/core": "^1.2.147" dependency.