mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
docs: add prepend option docs for addComponentsDir
(#25683)
This commit is contained in:
parent
fd671a27ea
commit
0a8a5916aa
@ -17,7 +17,7 @@ Register a directory to be scanned for components and imported only when used. K
|
||||
### Type
|
||||
|
||||
```ts
|
||||
async function addComponentsDir (dir: ComponentsDir): void
|
||||
async function addComponentsDir (dir: ComponentsDir, opts: { prepend?: boolean } = {}): void
|
||||
|
||||
interface ComponentsDir {
|
||||
path: string
|
||||
@ -158,6 +158,16 @@ An object with the following properties:
|
||||
|
||||
Transpile specified path using build.transpile. If set to `'auto'`, it will set `transpile: true` if `node_modules/` is in path.
|
||||
|
||||
#### `opts`
|
||||
|
||||
**Required**: `false`
|
||||
|
||||
- `prepend` (optional)
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
If set to `true`, the directory will be prepended to the array with `unshift()` instead of `push()`.
|
||||
|
||||
## `addComponent`
|
||||
|
||||
Register a component to be automatically imported.
|
||||
|
Loading…
Reference in New Issue
Block a user