aboutsummaryrefslogtreecommitdiff
path: root/node_modules/jest-pnp-resolver/getDefaultResolver.js
blob: ab90dbc8644d0f86a2b73c1a8560fffb2e3c4a26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
let defaultResolver;

module.exports = () => {
  if (!defaultResolver) {
    try {
      defaultResolver = require(`jest-resolve/build/defaultResolver`).default;
    } catch (error) {
      defaultResolver = require(`jest-resolve/build/default_resolver`).default;
    }
  }

  return defaultResolver;
};