You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A path that determines how to interpret the `from` path.
305
+
A path to be (1) prepended to `from`and (2) removed from the start of the result path(s).
306
306
307
307
> **Warning**
308
308
>
@@ -328,17 +328,15 @@ module.exports = {
328
328
};
329
329
```
330
330
331
-
The `context`option can be an absolute or relative path. If `context` is a relative, then it is converted to absolute based to`compiler.options.context`
331
+
`context` can be an absolute path or a relative path. If it is a relative path, then it will be converted to an absolute path based on`compiler.options.context`.
332
332
333
-
To determine the structure from which the found resources will be copied to the destination folder, the `context` option is used.
333
+
`context` should be explicitly set only when `from` contains a glob. Otherwise, `context` is automatically set, based on whether `from`is a file or a directory:
334
334
335
-
If `from` is a file, then `context` is equal to the directory in which this file is located. Accordingly, the result will be only the file name.
335
+
If `from` is a file, then `context` is its directory. The result path will be the filename alone.
336
336
337
-
If `from` is a directory, then `context`is the same as `from` and is equal to the directory itself. In this case, the result will be a hierarchical structure of the found folders and files relative to the specified directory.
337
+
If `from` is a directory, then `context`equals `from`. The result paths will be the paths of the directory's contents (including nested contents), relative to the directory.
338
338
339
-
If `from` is a glob, then regardless of the `context` option, the result will be the structure specified in the `from` option
340
-
341
-
More [`examples`](#examples)
339
+
The use of `context` is illustrated by these [`examples`](#examples).
0 commit comments