Is this valid export syntax?
export default debug = {
myfunction: myFunction
};
As debug is not defined when you assign your export object to it, and modules are run in strict mode, no. This is not valid. If you feel you must export a named object, you must declare it first.
let debug;
export default debug = {};
Note that you cannot declare the variable and export it in the same line.
export default const debug = {}; // invalid
From MDN:
Note that it is not possible to use var, let or const with export default.