1.导入require 导出 exports 或 module.exports 是 CommonJS 的标准,通常适用范围如 Node.js
2.import/export 是 ES6 的标准,通常适用范围如 React Vue
CommonJS 是同步加载模块,ES6是异步加载模块
1.导入require 导出 exports 或 module.exports 是 CommonJS 的标准,通常适用范围如 Node.js
2.import/export 是 ES6 的标准,通常适用范围如 React Vue
CommonJS 是同步加载模块,ES6是异步加载模块