• 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()).

    nuxt.config.js

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

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