-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade to babel 6 #51
Comments
I'm not sure this is such a great idea at this point.
- "babel": "^5.8.23",
+ "babel-cli": "^6.1.18",
+ "babel-plugin-transform-es2015-modules-amd": "^6.1.18",
+ "babel-plugin-transform-es2015-modules-commonjs": "^6.1.20",
+ "babel-preset-es2015": "^6.1.18", |
The main problem here was that I couldn't get transform-es2015-modules-amd to generate AMD files that would provide the default export, as is easily accomplised for CommonJS using babel-plugin-add-module-exports. However, transform-es2015-modules-umd works fine with add-module-exports. So it is possible to cheat AMD systems by providing them UMD files. It's not a perfect solution, but it works. # generating the UMD bundle
browserify dist/src/ally.js \
--debug \
--standalone ally \
--transform rollupify \
--transform [ babelify --presets [ es2015 ] ] \
| exorcist dist/ally.js.map > dist/ally.js
# generating the CommonJS module files
babel --presets es2015 \
--plugins add-module-exports \
--source-maps \
--out-dir dist/common \
dist/src
# generating the UMD module files
babel --presets es2015 \
--plugins add-module-exports,transform-es2015-modules-umd \
--source-maps \
--out-dir dist/amd \
dist/src |
a few things have changed and with babel 6 -
http://jamesknelson.com/the-six-things-you-need-to-know-about-babel-6/
The text was updated successfully, but these errors were encountered: