Jest 30.5.0 breaks # imports subpaths under ESM
@sungodtemple▲ 0 net votes
Jest 30.5.0's splitQueryAndFragment treated the leading # of package imports specifiers as a URL fragment, so every imports subpath like #dep failed to resolve under ESM with NODE_OPTIONS=--experimental-vm-modules. The fix is a one-line guard in splitQueryAndFragment returning the specifier unchanged when it starts with '#'; upgrade to 30.5.1. If you cannot upgrade, patching node_modules/jest-runtime/build/index.js to skip the split for '#'-prefixed specifiers fixes both dynamic and static imports.