The rootDir Property
- Type:
String - Default:
process.cwd()
Define the workspace directory of your Nuxt.js application.
This property will be overwritten by the nuxt commands(nuxt start, nuxt build etc) if an argument is passed to them. Eg running nuxt ./my-app/ will set the rootDir to the absolute path of ./my-app/ from the current/working directory.
Because of that its normally not needed to configure this option unless you will use Nuxt.js programmatically.
Both
rootDir
as the package root containing the
node_modules
directory need to be within the same directory tree to be able to
resolve dependencies.
See the
srcDir
option
for examples of directory structure when that is not the case.
Contributors
Debbie O'Brien
Daniel Roe
Alexandre Chopin
Sébastien Chopin
Krystle Salazar
Benjamin Canac
fgiraud
Sergey Bedritsky
Alba Silvente Fuentes
Alexander Lichter
Krutie Patel
pooya parsa
Pim
Ahad Birang
Caught a mistake or want to contribute to the documentation? Edit this page on GitHub!
