I have moduleA which exports some functions:
// moduleA.js
export function f1() {...}
export function f2() {...}
Is there any way to re-exp
file1.js
export let uselessObject = {
con1 : function () {
console.log('from file1.js')
}
}
file2.js
import { uselessObject } from './file1.js'
uselessObject.con2 = function(){
console.log('from file2.js ')
}
export { uselessObject } from './file1.js'
Index.js
import { uselessObject } from './file2.js'
uselessObject.con1()
uselessObject.con2()
Output
from file1.js
from file2.js