azu / commonjs-to-es-module-codemod

Codemod that convert CommonJS(require/exports) to ES Modules(import/export) for JavaScript/TypeScript
MIT License
80 stars 15 forks source link

Feature/fix export as object expression #16

Closed albyrock87 closed 1 year ago

albyrock87 commented 1 year ago

I apologize a lot, i just realized that the code also matches module.exports = { foo: bar } which now translates to export { foo: bar } which is an invalid syntax.

azu commented 1 year ago

Oh, I see. No problem 👍