I\'m trying to create a module that exports multiple ES6 classes. Let\'s say I have the following directory structure:
my/
└── module/
├── Foo.js
├──
For multiple classes in the same js file, extending Component from @wordpress/element, you can do that :
// classes.js
import { Component } from '@wordpress/element';
const Class1 = class extends Component {
}
const Class2 = class extends Component {
}
export { Class1, Class2 }
And import them in another js file :
import { Class1, Class2 } from './classes';