Skip to content

ES6 transformation not working #26

@martintietz

Description

@martintietz

Using this example file test.jsx:

class TestClass {
    testoutput() {
        console.log('Some text...');
    }
};

module.exports = TestClass;

Trying to require test.jsx from inside another file ...

require('node-jsx').install({ extension: '.jsx', harmony: true });

var test = require('./test.jsx');

test.testoutput();

... gives me the following error:

test.testoutput();
     ^
TypeError: undefined is not a function

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