Skip to content

Commit

Permalink
Fix/modulesdir docs (#541)
Browse files Browse the repository at this point in the history
* fix: modulesdir docs

* fix: modulesdir docs
  • Loading branch information
debs-obrien authored and ImgBotApp committed Jan 10, 2023
1 parent 857b1c0 commit fab0836
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 25 deletions.
14 changes: 1 addition & 13 deletions content/en/guides/directory-structure/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default {
modules: [
// Simple usage
'~/modules/simple',
// Passing options directly
// Passing options directly
['~/modules/simple', { token: '123' }]
]
}
Expand Down Expand Up @@ -445,18 +445,6 @@ If you are going to offer using `buildModules` please mention that this featur

</base-alert>

## The modulesDir Property

The modulesDir property is used to set the modules directories for path resolving. For example: Webpack's resolveLoading, nodeExternals and postcss. The configuration path is relative to `options.rootDir` (default: process.cwd()).

```js{}[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.

<app-modal>
<code-sandbox :src="csb_link"></code-sandbox>
</app-modal>
Expand Down
18 changes: 18 additions & 0 deletions content/en/guides/directory-structure/nuxt-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,24 @@ See more on the [modules property](/guides/configuration-glossary/configuration

</base-alert>

### modulesDir

The modulesDir property is used to set the modules directories for path resolving. For example: Webpack's resolveLoading, nodeExternals and postcss. The configuration path is relative to `options.rootDir` (default: process.cwd()).

```js{}[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.

<base-alert type="next">

See more on the [modulesDir property](/guides/configuration-glossary/configuration-modulesdir)

</base-alert>

### plugins

This option lets you define JavaScript plugins that should be run before instantiating the root Vue.js application.
Expand Down
12 changes: 0 additions & 12 deletions content/pt/guides/directory-structure/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,18 +445,6 @@ Se você sugerir utilizar o `buildModules`, por favor mencione que este recurso

</base-alert>

## A propriedade modulesDir

A propriedade modulesDir é usada para definir os diretórios dos módulos para resolução de caminho. Por exemplo: resolveLoading do Webpack, nodeExternals e postcss. O caminho de configuração é relativo a `options.rootDir` (padrão: process.cwd()).

```js{}[nuxt.config.js]
export default {
modulesDir: ['../../node_modules']
}
```

A configuração deste campo pode ser necessária se o seu projeto for organizado como um mono-repositório no estilo de área de trabalho do Yarn.

<app-modal>
<code-sandbox :src="csb_link"></code-sandbox>
</app-modal>
Expand Down
18 changes: 18 additions & 0 deletions content/pt/guides/directory-structure/nuxt-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,24 @@ Saiba mais sobre a [propriedade modules](/guides/configuration-glossary/configur

</base-alert>

### modulesDir

A propriedade modulesDir é usada para definir os diretórios dos módulos para resolução de caminho. Por exemplo: resolveLoading do Webpack, nodeExternals e postcss. O caminho de configuração é relativo a `options.rootDir` (padrão: process.cwd()).

```js{}[nuxt.config.js]
export default {
modulesDir: ['../../node_modules']
}
```

A configuração deste campo pode ser necessária se o seu projeto for organizado como um mono-repositório no estilo de área de trabalho do Yarn.

<base-alert type="next">

Saiba mais sobre a [propriedade modulesDir](/guides/configuration-glossary/configuration-modulesdir)

</base-alert>

### plugins

Esta opção permite definir plugins JavaScript que devem ser executados antes de instanciar o aplicativo raiz Vue.js.
Expand Down

0 comments on commit fab0836

Please sign in to comment.