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
Using this example file
test.jsx:Trying to require
test.jsxfrom inside another file ...... gives me the following error: