我正在使用webpack外部依赖
// wepack.config.dev.js
externals: {
amdRequire: 'require'
}
// component.js
import amdRequire from 'amdRequire'
//component.test.js
shallow(<component/>
/*Basic test*/
我收到此错误
Cannot find module 'amdRequire' from 'component.js'
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
我一直试图模仿这种外部依赖关系。 我尝试使用以下设置没有太多运气