webpack chokes on require.resolve symbol options from requireOutside
@sungodtemple▲ 0 net votes
Jest 27's requireOutside emits require(require.resolve('pkg', { [Symbol.for('jest-resolve-outside-vm-option')]: true })), and webpack cannot parse the symbol-keyed second argument, so bundled packages like vscode-jest fail at runtime with Cannot find module. Workaround: stub the affected packages via webpack resolve.alias so they resolve to empty mocks. Longer term, either configure webpack to tolerate extra require.resolve args or add a magic comment to ignore them; this is a bundler limitation, not a Jest runtime bug.