-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Conversation
Meanwhile you can re-configure babel-register in your "truffle.js" file, like so: require("babel-polyfill");
require("babel-register")({
"presets": ["es2015"],
"plugins": ["syntax-async-functions","transform-regenerator"]
});
module.exports = {
build: {
"index.html": "index.html",
"app.js": [
"javascripts/app.js"
],
"app.css": [
"stylesheets/app.css"
],
"images/": "images/"
},
deploy: [
// "Contract"
],
rpc: {
host: "localhost",
port: 8545
}
}; (ref: http://masnun.com/2015/11/11/using-es7-asyncawait-today-with-babel.html) |
I've hand-merged this into the |
Please close if this works for you so it updates the milestone. |
I've found that this addition breaks testing (and likely other things):
This is likely because of this code added:
I've changed it to this, and left it up to the user to specify their presets in their project's .babelrc.
|
@lucasconstantino I really like your solution instead. Perhaps that should be the solution for all truffle projects that want to use babel. The Truffle requirement on babel is overkill since Truffle doesn't use babel internally. |
thanks @lucasconstantino solution works for me |
You can update your node to the newest version by following step.
Test ok on Mac Os. |
I want to use async/await again