getDefaultResolver.js 304 B

12345678910111213
  1. let defaultResolver;
  2. module.exports = () => {
  3. if (!defaultResolver) {
  4. try {
  5. defaultResolver = require(`jest-resolve/build/defaultResolver`).default;
  6. } catch (error) {
  7. defaultResolver = require(`jest-resolve/build/default_resolver`).default;
  8. }
  9. }
  10. return defaultResolver;
  11. };