在命令行运行 mocha 测试时,一旦我尝试使用 isomorphic-fetch,就会出现 referenceerror: self is not defined

作者: ericlau-solid创建于 2015年12月29日更新于 2021年9月17日

所以我想使用这个,我有一个使用 webpack、npm 和 es6 的 SPA 客户端应用。当我在以下行中添加这个代码时:

内容来源: matthew-andrews/isomorphic-fetch