Want to take a look at our new docs? Our new docs are now in beta. Have fun!

The modulesDir Property

  • Type: Array
  • Default: ['node_modules']

Used to set the modules directories for path resolving, for example: Webpack's resolveLoading, nodeExternals and postcss. Configuration path is relative to options.rootDir (default: process.cwd()).

Example (nuxt.config.js):

export default {
  modulesDir: ['../../node_modules']
}

Setting this field may be necessary if your project is organized as a Yarn workspace-styled mono-repository.

Contributors

Contribution for this page is now closed. If you would like to contribute please check out our new docs are now in beta. Have fun!

Platinum Sponsors

Storyblok Support Us