Skip to content

Commit 7c4ab53

Browse files
authored
docs: update migration guide for multiple static values (#3732)
1 parent e55f2c3 commit 7c4ab53

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

migration-v4.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,26 @@ module.exports = {
324324
};
325325
```
326326

327+
Provide an array of objects in case you have multiple static folders:
328+
329+
```js
330+
module.exports = {
331+
//...
332+
devServer: {
333+
static: [
334+
{
335+
directory: path.join(__dirname, "assets"),
336+
publicPath: "/serve-public-path-url",
337+
},
338+
{
339+
directory: path.join(__dirname, "css"),
340+
publicPath: "/other-serve-public-path-url",
341+
},
342+
],
343+
},
344+
};
345+
```
346+
327347
- Default value of the `static` option is `path.resolve(process.cwd(), 'public')` directory and enabled by default.
328348
- `static.watch` is enabled by default.
329349
- The `socket` option was renamed to `ipc` (also supports `string` type, i.e. path to unix socket):

0 commit comments

Comments
 (0)