아래 예제는 "hello world"를 출력하지 않는 이유는 무엇입니까? 대신에, 나는 점점 오전 :자바 스크립트 내보내기/가져 오기 클래스
TypeError: _base2.default.test is not a function
(가 바벨로 transpiled되고있다)
file1.js
import Example from './file2';
console.log(Example.test());
file2.js
export default class Example {
test() {
console.log('hello world');
}
}