Javascript 6to5 (now Babel) export module usage
问题 I'm still a beginner, i try to to export and import one class into a main file, the other class in the others class file and use them. And then gulp ES5 code with 6to5 (now Babel). // file a.js import B from 'b.js'; class A { constructor() { B.methodB(); } } export default A; // file b.js class B { methodB() { console.log('hi from b'); } } export default B; // file main.js import A from 'a.js'; new A(); My gulpfile: var gulp = require('gulp'); var to5 = require('gulp-6to5'); gulp.task(