magic-akari/swc_mut_cjs_exports

Change the plugin name to something unrelated to Jest?

fatso83 opened this issue · 0 comments

I came across this plugin when searching for ways of changing the output of SWC so that exports would be mutable. This seemed to do just that, but the naming seemed to imply it was Jest specific. As you told me in #65, it is not Jest specific at all and should work out of the box! I then demonstrated it actually works fine with Mocha (and any other general tool that would register this module before running).

So ... that left me wondering: why on Earth should this still be called jest_workaround? That name is neither telling in what it does nor true to the implication of it being Jest specific. It's a general plugin to alter SWC's common js output. So I suggest renaming it to something like swc-plugin-mutable-cjs-exports. It would make it much more apparent that it is generally applicable and one could still market it for Jest as before, but also any other tool.