たまに使いたくなったりならなかったりするので残しておく
$ yarn init --yes
$ yarn add -D babel-cli babel-plugin-transform-es2015-modules-commonjs
$ ./node_modules/.bin/babel --plugins transform-es2015-modules-commonjs {input.js} > {output.js}
More than 5 years have passed since last update.
$ yarn init --yes
$ yarn add -D babel-cli babel-plugin-transform-es2015-modules-commonjs
$ ./node_modules/.bin/babel --plugins transform-es2015-modules-commonjs {input.js} > {output.js}
Register as a new user and use Qiita more conveniently