diff --git a/packages/@vue/cli-shared-utils/lib/module.js b/packages/@vue/cli-shared-utils/lib/module.js index c5f1953fbd..b6da0c4298 100644 --- a/packages/@vue/cli-shared-utils/lib/module.js +++ b/packages/@vue/cli-shared-utils/lib/module.js @@ -62,10 +62,9 @@ exports.resolveModule = function (request, context) { } exports.loadModule = function (request, context, force = false) { - // createRequire doesn't work with jest mock modules - // (which we used in migrator for inquirer, and in tests for cli-service) - // TODO: it's supported in Jest 25 - if (process.env.VUE_CLI_TEST && (request.endsWith('migrator') || context === '/')) { + // createRequire doesn't work with jest mocked fs + // (which we used in tests for cli-service) + if (process.env.VUE_CLI_TEST && context === '/') { return require(request) }