* Correctly transpile export bindings for some for-of loops * Correctly transform non-destructured for of loops to update exported variables * Add tests * Don't replace entire for of loop * Correctly transform destructured for-of/for-in exports * Update exported variables in array pattern and more fixes * Refresh test output * Update tests and rebase on master * Refactor ForOf|ForIn visitor * Don't transform re-declared exported vars * Generate better name for loop id Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com> * Idiomatically generate UidIdentifier * Update scope after replacing loop declaration Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
@babel/plugin-transform-modules-commonjs
This plugin transforms ES2015 modules to CommonJS
See our website @babel/plugin-transform-modules-commonjs for more information.
Install
Using npm:
npm install --save-dev @babel/plugin-transform-modules-commonjs
or using yarn:
yarn add @babel/plugin-transform-modules-commonjs --dev