Resolving imports using webpack's worker-loader in Jest tests
问题 I'm writing a Jest test and am having trouble resolving this import which uses webpack's worker-loader import ImageInfoWorker from 'worker-loader?name=image_info!@WORKERS/image-info'; I have some other aliases which are resolving properly in my tests, such as: import Store from '@SUPPORT/store'; import * as api from '@SUPPORT/api'; Here is the relevant snippet from package.json "jest": { "moduleFileExtensions": ["js", "jsx"], "moduleNameMapper": { "^@CSS/(.*)$": "<rootDir>/css/$1", "^