Reputation: 51
I have a file like this :
let Utils = {
//random stuff code
}
module.exports = Utils
I wanna run import Utils form 'Utils'
anywhere, what I should do?
Upvotes: 2
Views: 59
Reputation: 2729
let Utils = {
//random stuff code
}
export default Utils
Then:
import Utils from '/path/to/utils';
Upvotes: 2