mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +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
|
debug: undefined, // Will be equal to dev if not provided
|
||||||
buildDir: '.nuxt',
|
buildDir: '.nuxt',
|
||||||
cacheDir: '.cache',
|
cacheDir: '.cache',
|
||||||
|
nuxtDir: resolve(__dirname, '..'), // Relative to dist
|
||||||
nuxtAppDir: resolve(__dirname, '../lib/app/'), // Relative to dist
|
nuxtAppDir: resolve(__dirname, '../lib/app/'), // Relative to dist
|
||||||
build: {
|
build: {
|
||||||
analyze: false,
|
analyze: false,
|
||||||
|
@ -19,6 +19,13 @@ export default class Nuxt {
|
|||||||
// Paths for resolving requires from `rootDir`
|
// Paths for resolving requires from `rootDir`
|
||||||
this.nodeModulePaths = Module._nodeModulePaths(this.options.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.initialized = false
|
||||||
this.errorHandler = this.errorHandler.bind(this)
|
this.errorHandler = this.errorHandler.bind(this)
|
||||||
// Hooks
|
// Hooks
|
||||||
|
Loading…
Reference in New Issue
Block a user