mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 06:05:11 +00:00
_fix(pnp): resolve module dependencies
This commit is contained in:
parent
5bd4fe08c6
commit
d3ef163004
@ -157,6 +157,8 @@ export default class ModuleContainer {
|
||||
if (!handler) {
|
||||
try {
|
||||
handler = this.nuxt.resolver.requireModule(src, { paths })
|
||||
// pnp support
|
||||
try { (global.__NUXT_PATHS__ || []).push(this.nuxt.resolver.resolvePath(src, { paths })) } catch (_err) {}
|
||||
} catch (error) {
|
||||
if (error.code !== 'MODULE_NOT_FOUND') {
|
||||
throw error
|
||||
|
@ -228,6 +228,7 @@ export default class WebpackBaseConfig {
|
||||
const resolvePath = [
|
||||
this.buildContext.options.rootDir,
|
||||
__dirname,
|
||||
...(global.__NUXT_PATHS__ || []),
|
||||
resolveModule('@nuxt/vue-app'),
|
||||
resolveModule('@nuxt/babel-preset-app')
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user