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
|[`context`](#context)|`{String}`|`options.context \|\| compiler.options.context`| A path that determines how to interpret the `from` path. |
84
84
|[`globOptions`](#globoptions)|`{Object}`|`undefined`|[Options][glob-options] passed to the glob pattern matching library including `ignore` option. |
85
85
|[`filter`](#filter)|`{Function}`|`undefined`| Allows to filter copied assets. |
@@ -174,9 +174,11 @@ More [`examples`](#examples)
174
174
175
175
#### `to`
176
176
177
-
Type: `String`
177
+
Type: `String|Function`
178
178
Default: `compiler.options.output`
179
179
180
+
##### String
181
+
180
182
Output path.
181
183
182
184
> ⚠️ Don't use directly `\\` in `to` (i.e `path\to\dest`) option because on UNIX the backslash is a valid character inside a path component, i.e., it's not a separator.
@@ -208,6 +210,53 @@ module.exports = {
208
210
};
209
211
```
210
212
213
+
##### Function
214
+
215
+
Allows to modify the writing path.
216
+
217
+
> ⚠️ Don't return directly `\\` in `to` (i.e `path\to\newFile`) option because on UNIX the backslash is a valid character inside a path component, i.e., it's not a separator.
218
+
> On Windows, the forward slash and the backward slash are both separators.
* options.patterns[0].to should be an instance of function."
99
106
`;
100
107
101
108
exports[`validate options should throw an error on the "patterns" option with "[{"from":{"glob":"**/*","dot":false},"to":"dir","context":"context"}]" value 1`] =`
0 commit comments