Reputation: 55
I am trying to run build on a directory using Babel. I have a babel.config.js set up in the same directory. I would have expected this to compile but my lack of understanding of how Javascript runs is not letting me proceed here. Could someone please point out what could be going wrong?
Upvotes: 0
Views: 280
Reputation: 370979
The Babel docs say that to use it, you need to:
(1) Install the plugin:
npm install --save-dev @babel/plugin-proposal-function-bind
(2) Add it to your Babel config:
{
"plugins": ["@babel/plugin-proposal-function-bind"]
}
Or, you could go back to the old syntax without using Babel at all:
this.on('client:beforeCommand', (...args) => this.onBeforeCommand(...args));
Upvotes: 2