javascript - Nodejs - 如何从“模块”导出 *
问题描述
如何export * from "module"
在不使用 ES6 导入的 NodeJS 环境中执行操作?
我必须这样做吗:
const {a, b, c, d, e, f, g, ..., z} = require("module");
module.exports = {a, b, c, d, ..., z};
还是有其他更快的方法?
谢谢你。
解决方案
module.exports = require("module");