File tree Expand file tree Collapse file tree 6 files changed +61
-25
lines changed Expand file tree Collapse file tree 6 files changed +61
-25
lines changed Original file line number Diff line number Diff line change
1
+ # Bonjour (ZeroConf)
2
+
3
+ The Bonjour capability broadcasts server information via ZeroConf when the Server
4
+ is started.
5
+
6
+ ## boolean
7
+
8
+ ** webpack.config.js**
9
+
10
+ ``` js
11
+ module .exports = {
12
+ // ...
13
+ devServer: {
14
+ bonjour: true ,
15
+ },
16
+ };
17
+ ```
18
+
19
+ Usage via CLI:
20
+
21
+ ``` console
22
+ npx webpack serve --bonjour
23
+ ```
24
+
25
+ ## What Should Happen
26
+
27
+ A Zeroconf broadcast should occur, containing data with a type of ` http ` and a
28
+ subtype of ` webpack ` .
Original file line number Diff line number Diff line change
1
+ "use strict" ;
2
+
3
+ const target = document . querySelector ( "#target" ) ;
4
+
5
+ target . innerHTML = "Please check your Zeroconf service." ;
Original file line number Diff line number Diff line change 2
2
3
3
// our setup function adds behind-the-scenes bits to the config that all of our
4
4
// examples need
5
- const { setup } = require ( "../util" ) ;
5
+ const { setup } = require ( "../../ util" ) ;
6
6
7
7
module . exports = setup ( {
8
8
context : __dirname ,
9
9
entry : "./app.js" ,
10
+ devServer : {
11
+ bonjour : true ,
12
+ } ,
10
13
} ) ;
Original file line number Diff line number Diff line change 3
3
The Bonjour capability broadcasts server information via ZeroConf when the Server
4
4
is started.
5
5
6
- ** webpack.config.js**
7
-
8
- ``` js
9
- module .exports = {
10
- // ...
11
- devServer: {
12
- bonjour: true ,
13
- },
14
- };
15
- ```
16
-
17
- Usage via CLI:
18
-
19
- ``` console
20
- npx webpack serve --bonjour
21
- ```
22
-
23
- ## What Should Happen
24
-
25
- A Zeroconf broadcast should occur, containing data with a type of ` http ` and a
26
- subtype of ` webpack ` .
27
-
28
- # Bonjour options
6
+ ## Bonjour options
29
7
30
8
Allows options from bonjour for more [ configuration] ( https://github.com/watson/bonjour#initializing ) :
31
9
32
10
``` js
33
11
// webpack.config.js
34
12
module .exports = {
35
- /* ... */
13
+ // ...
36
14
devServer: {
37
15
bonjour: {
38
16
name: " webpack-dev-server" ,
Original file line number Diff line number Diff line change
1
+ "use strict" ;
2
+
3
+ const target = document . querySelector ( "#target" ) ;
4
+
5
+ target . innerHTML = "Please check your Zeroconf service." ;
Original file line number Diff line number Diff line change
1
+ "use strict" ;
2
+
3
+ // our setup function adds behind-the-scenes bits to the config that all of our
4
+ // examples need
5
+ const { setup } = require ( "../../util" ) ;
6
+
7
+ module . exports = setup ( {
8
+ context : __dirname ,
9
+ entry : "./app.js" ,
10
+ devServer : {
11
+ bonjour : {
12
+ name : "webpack-dev-server" ,
13
+ type : "https" ,
14
+ subtype : "webpack" ,
15
+ } ,
16
+ } ,
17
+ } ) ;
You can’t perform that action at this time.
0 commit comments