mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
resolve extra modules if nuxt linked (#2212)
This commit is contained in:
parent
fd42610862
commit
967a442d5e
@ -181,6 +181,7 @@ Options.defaults = {
|
||||
debug: undefined, // Will be equal to dev if not provided
|
||||
buildDir: '.nuxt',
|
||||
cacheDir: '.cache',
|
||||
nuxtDir: resolve(__dirname, '..'), // Relative to dist
|
||||
nuxtAppDir: resolve(__dirname, '../lib/app/'), // Relative to dist
|
||||
build: {
|
||||
analyze: false,
|
||||
|
@ -19,6 +19,13 @@ export default class Nuxt {
|
||||
// Paths for resolving requires from `rootDir`
|
||||
this.nodeModulePaths = Module._nodeModulePaths(this.options.rootDir)
|
||||
|
||||
if (this.options.nuxtDir.indexOf(this.options.rootDir) !== 0) {
|
||||
this.nodeModulePaths = [
|
||||
...this.nodeModulePaths,
|
||||
...Module._nodeModulePaths(this.options.nuxtDir)
|
||||
]
|
||||
}
|
||||
|
||||
this.initialized = false
|
||||
this.errorHandler = this.errorHandler.bind(this)
|
||||
// Hooks
|
||||
|
Loading…
Reference in New Issue
Block a user