我想把这个CJS的request语句转换为通过ES模块导入来加载(我的package.json中已经有type:'module')。
var https = require('https').globalAgent.options.ca = require('ssl-root-cas/latest').create();
这可以通过使用...
import sslrootcas from 'ssl-root-cas';
https.globalAgent.ca = sslrootcas.create();
但我想知道ES模块是否有类似于CJS的单行方法?