mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
_fix: use pwd as last option for resolveModule
[release]
This commit is contained in:
parent
a31a878db5
commit
57c6f23a52
@ -28,7 +28,7 @@ export default class Resolver {
|
|||||||
resolveModule (path, { paths } = {}) {
|
resolveModule (path, { paths } = {}) {
|
||||||
try {
|
try {
|
||||||
return this._require.resolve(path, {
|
return this._require.resolve(path, {
|
||||||
paths: [].concat(paths || [], this.options.modulesDir, global.__NUXT_PATHS__ || [])
|
paths: [].concat(paths || [], this.options.modulesDir, global.__NUXT_PATHS__ || [], process.cwd())
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code !== 'MODULE_NOT_FOUND') {
|
if (error.code !== 'MODULE_NOT_FOUND') {
|
||||||
|
@ -68,7 +68,7 @@ export function resolveModule (id, paths) {
|
|||||||
paths = [paths]
|
paths = [paths]
|
||||||
}
|
}
|
||||||
return _require.resolve(id, {
|
return _require.resolve(id, {
|
||||||
paths: [].concat(paths || [], global.__NUXT_PATHS__ || [])
|
paths: [].concat(paths || [], global.__NUXT_PATHS__ || [], process.cwd())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user