by fold_left · 9y ago · 0 comments
export default { foo: 2 };
export const foo = 3;
// other file
import { foo } from './file'
console.log(foo);
Presumably last one wins or, if the other way around, a reassignment of const error?
is not the same as:
module.exports = { foo: 2 };
The way your example would translate to commonjs is:
module.exports = { default: { foo: 2 }, foo: 3 }