@nuxt/docs-nightly 5.0.0-29741395.1dfe8e50 → 5.0.0-29741433.e90840ab
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -44,6 +44,21 @@ If you have a component in nested directories such as:
|
|
|
44
44
|
For clarity, we recommend that the component's filename matches its name. So, in the example above, you could rename `Button.vue` to be `BaseFooButton.vue`.
|
|
45
45
|
::
|
|
46
46
|
|
|
47
|
+
If you want to group components in a directory without affecting their name, you can use the parenthesis `(` `)` to name the grouping directory.
|
|
48
|
+
|
|
49
|
+
```bash [Grouping Directory]
|
|
50
|
+
-| components/
|
|
51
|
+
---| base/
|
|
52
|
+
-----| (foo)/
|
|
53
|
+
-------| Button.vue
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
... then the component's name will skip the grouping directory, resulting in:
|
|
57
|
+
|
|
58
|
+
```html
|
|
59
|
+
<BaseButton />
|
|
60
|
+
```
|
|
61
|
+
|
|
47
62
|
If you want to auto-import components based only on its name, not path, then you need to set `pathPrefix` option to `false` using extended form of the configuration object:
|
|
48
63
|
|
|
49
64
|
```ts twoslash [nuxt.config.ts]
|