Skip to content

Can't get it to work #12

@Jack89ita

Description

@Jack89ita

Hi, i'm a beginner in terms of babel an ECMAScript 6 and i need help to use this plugin.
i would like to use it but i can't get it to work.
I installed the package and i'm trying to use it with .babelrc method.
In my project i got babelify with browserify.
Here is the code:

// sitrep
function bar () {
  var a = 'foo'
  const b = 'bar'
  let c = [a, b].map(x => x)
  return c.join('-')
}
console.log(bar());

Here is the compiled one:

function bar() {
    var a = 'foo';
    var b = 'bar';
    var c = [a, b].map(function (x) {
        return x;
    });
    return c.join('-');
}
console.log(bar());

As you can see it doesn't inserte the console logs.
Can you help me please?
Thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions