Nuxt 2 reached end of life on 30 June 2024
It no longer receives bug fixes or security patches. Upgrade to Nuxt 4 or get extended support from HeroDevs
The modulesDir Property
Define the modules directory for your Nuxt application
- Type:
Array - Default:
['node_modules']
Used to set the modules directories for path resolving, for example: Webpack'sresolveLoading,nodeExternalsandpostcss. Configuration path is relative to options.rootDir (default:process.cwd()).
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.