【发布时间】:2020-04-23 20:13:22
【问题描述】:
我想将此 CJS 要求语句转换为通过 ES 模块导入加载。 (我的 package.json 中已经有 type: 'module')
var https = require('https').globalAgent.options.ca = require('ssl-root-cas/latest').create();
【问题讨论】:
-
ssl-root-cas/latest似乎没有使用 ES6 导出。您使用的是什么转译器解决方案? -
我正在使用我认为使用 webpack 的 next.js
标签: es6-modules commonjs