@nuxt/docs-nightly 5.0.0-29671024.a006fd40 → 5.0.0-29671598.660fe345
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.
|
@@ -8,11 +8,11 @@ links:
|
|
|
8
8
|
size: xs
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
Sometimes you need to resolve a
|
|
11
|
+
Sometimes you need to resolve a path relative to the current module without knowing the name or extension. For example, you may want to add a plugin that is located in the same directory as the module. To handle these cases, Nuxt provides a set of utilities to resolve paths. `resolvePath` and `resolveAlias` are used to resolve paths relative to the current module. `findPath` is used to find the first existing file in a given set of paths. `createResolver` is used to create a resolver relative to the base path.
|
|
12
12
|
|
|
13
13
|
## `resolvePath`
|
|
14
14
|
|
|
15
|
-
Resolves full path to a file or directory respecting Nuxt alias and extensions options. If path could not be resolved, normalized input path will be returned.
|
|
15
|
+
Resolves the full path to a file or directory, respecting Nuxt alias and extensions options. If a path could not be resolved, a normalized input path will be returned.
|
|
16
16
|
|
|
17
17
|
### Usage
|
|
18
18
|
|
|
@@ -115,7 +115,7 @@ function resolveAlias (path: string, alias?: Record<string, string>): string
|
|
|
115
115
|
|
|
116
116
|
## `findPath`
|
|
117
117
|
|
|
118
|
-
Try to resolve first existing file in given paths.
|
|
118
|
+
Try to resolve first existing file in a given set of paths.
|
|
119
119
|
|
|
120
120
|
### Usage
|
|
121
121
|
|