Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(core): use require.resolve instead of Module internals #5796

Merged
merged 7 commits into from May 25, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/core/src/resolver.js
@@ -1,4 +1,3 @@
import Module from 'module'
import { resolve, join } from 'path'
import fs from 'fs-extra'
import consola from 'consola'
Expand All @@ -23,7 +22,7 @@ export default class Resolver {

resolveModule(path) {
try {
return Module._resolveFilename(path, {
return require.resolve(path, {
paths: this.options.modulesDir
})
} catch (error) {
Expand Down