We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
allowedHosts: 'auto'
1 parent da57cca commit 5f2a01bCopy full SHA for 5f2a01b
src/content/configuration/dev-server.mdx
@@ -146,6 +146,25 @@ Usage via the CLI:
146
npx webpack serve --allowed-hosts all
147
```
148
149
+When set to `'auto'` this option always allows `localhost`, [`host`](#devserverhost), and [`client.webSocketURL.hostname`](#websocketurl):
150
+
151
+**webpack.config.js**
152
153
+```javascript
154
+module.exports = {
155
+ //...
156
+ devServer: {
157
+ allowedHosts: 'auto',
158
+ },
159
+};
160
+```
161
162
+Usage via the CLI:
163
164
+```bash
165
+npx webpack serve --allowed-hosts auto
166
167
168
## `devServer.bonjour`
169
170
`boolean` `object`
0 commit comments