exports and module.exports in node are both empty objects. The output and import methods are as follows:
1:
// a.js
module.exports = {a:1}
// b.js
import a from "a.js" require("a.js")
// {a:1}
2:
// a.js
exports.a = 1
// 1
//
exports = {a: 1}
// {}
exports and module.exports both point to an empty object, and exports = {a: 1}
is also assigned to this empty object, but why is the output still an empty object? Ask the boss for advice. no, no, no.