-
-
Notifications
You must be signed in to change notification settings - Fork 591
/
serve-basic.test.js.snap.devServer3.webpack4
163 lines (120 loc) · 8.65 KB
/
serve-basic.test.js.snap.devServer3.webpack4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`basic serve usage should log an error on unknown flag: stderr 1`] = `
"[webpack-cli] Error: Unknown option '--unknown-flag'
[webpack-cli] Run 'webpack --help' to see available commands and options"
`;
exports[`basic serve usage should log an error on unknown flag: stdout 1`] = `""`;
exports[`basic serve usage should log error on using '--watch' flag with serve: stderr 1`] = `
"[webpack-cli] Error: Unknown option '--watch'
[webpack-cli] Run 'webpack --help' to see available commands and options"
`;
exports[`basic serve usage should log error on using '--watch' flag with serve: stdout 1`] = `""`;
exports[`basic serve usage should log error on using '-w' alias with serve: stderr 1`] = `
"[webpack-cli] Error: Unknown option '-w'
[webpack-cli] Run 'webpack --help' to see available commands and options"
`;
exports[`basic serve usage should log error on using '-w' alias with serve: stdout 1`] = `""`;
exports[`basic serve usage should log used supplied config with serve: stderr 1`] = `
" [webpack-cli] Compiler starting...
[webpack-cli] Compiler is using config: '<cwd>/test/serve/basic/log.config.js'
[webpack-cli] Compiler finished
[webpack-cli] Compiler is watching files for updates..."
`;
exports[`basic serve usage should respect the "publicPath" option from configuration (from the "devServer" options): stderr 1`] = `""`;
exports[`basic serve usage should respect the "publicPath" option from configuration using multi compiler mode (from the "devServer" options): stderr 1`] = `""`;
exports[`basic serve usage should respect the "publicPath" option from configuration using multi compiler mode: stderr 1`] = `""`;
exports[`basic serve usage should respect the "publicPath" option from configuration: stderr 1`] = `""`;
exports[`basic serve usage should shoe help information for serve: stderr 1`] = `""`;
exports[`basic serve usage should shoe help information for serve: stdout 1`] = `
"Usage: webpack serve|server|s [entries...] [options]
Run the webpack dev server.
Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
-j, --json [value] Prints result as JSON or store it in a file.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
-t, --target <value> Sets the build target e.g. node.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--mode <value> Defines the mode to pass to webpack.
--name <value> Name of the configuration. Used when loading multiple configurations.
--stats [value] It instructs webpack on how to treat the stats e.g. verbose.
--no-stats Disable stats output.
--watch-options-stdin Stop watching when stdin stream has ended.
--no-watch-options-stdin Do not stop watching when stdin stream has ended.
--bonjour Broadcasts the server via ZeroConf networking on start
--lazy Lazy
--liveReload Enables/Disables live reloading on changing files
--serveIndex Enables/Disables serveIndex middleware
--inline Inline mode (set to false to disable including client scripts like livereload)
--profile Print compilation profile data for progress steps
--progress Print compilation progress in percentage
--hot-only Do not refresh page if HMR fails
--stdin close when stdin ends
--open [value] Open the default browser, or optionally specify a browser name
--useLocalIp Open default browser with local IP
--open-page <value> Open default browser with the specified page
--client-log-level <value> Log level in the browser (trace, debug, info, warn, error or silent)
--https HTTPS
--http2 HTTP/2, must be used with HTTPS
--key <value> Path to a SSL key.
--cert <value> Path to a SSL certificate.
--cacert <value> Path to a SSL CA certificate.
--pfx <value> Path to a SSL pfx file.
--pfx-passphrase <value> Passphrase for pfx file.
--content-base <value> A directory or URL to serve HTML content from.
--watch-content-base Enable live-reloading of the content-base.
--history-api-fallback Fallback to /index.html for Single Page Applications.
--compress Enable gzip compression
--port <value> The port
--disable-host-check Will not check the host
--socket <value> Socket to listen
--public <value> The public hostname/ip address of the server
--host <value> The hostname/ip address the server will bind to
--allowed-hosts <value...> A list of hosts that are allowed to access the dev server, separated by spaces
Global options:
--color Enable colors on console.
--no-color Disable colors on console.
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
-h, --help [verbose] Display help for commands and options.
To see list of all supported commands and options run 'webpack --help=verbose'.
Webpack documentation: https://webpack.js.org/.
CLI documentation: https://webpack.js.org/api/cli/.
Made with ♥ by the webpack team."
`;
exports[`basic serve usage should throw error when same ports in multicompiler: stderr 1`] = `
"[webpack-cli] Error: Unique ports must be specified for each devServer option in your webpack configuration. Alternatively, run only 1 devServer config using the --config-name flag to specify your desired config.
at stack"
`;
exports[`basic serve usage should throw error when same ports in multicompiler: stdout 1`] = `""`;
exports[`basic serve usage should work and log warning on the \`watch option in a configuration: stderr 1`] = `"[webpack-cli] No need to use the 'serve' command together with '{ watch: true }' configuration, it does not make sense."`;
exports[`basic serve usage should work in multi compiler mode: stderr 1`] = `""`;
exports[`basic serve usage should work with "--hot" and "--port" options: stderr 1`] = `""`;
exports[`basic serve usage should work with entries syntax: stderr 1`] = `""`;
exports[`basic serve usage should work with the "--client-log-level" option: stderr 1`] = `""`;
exports[`basic serve usage should work with the "--config" and "--env" options and expose dev server options: stderr 1`] = `""`;
exports[`basic serve usage should work with the "--config" and "--env" options: stderr 1`] = `""`;
exports[`basic serve usage should work with the "--config" option: stderr 1`] = `""`;
exports[`basic serve usage should work with the "--hot" option using the "only" value: stderr 1`] = `""`;
exports[`basic serve usage should work with the "--hot" option: stderr 1`] = `""`;
exports[`basic serve usage should work with the "--mode" option #2: stderr 1`] = `""`;
exports[`basic serve usage should work with the "--mode" option #3: stderr 1`] = `""`;
exports[`basic serve usage should work with the "--mode" option: stderr 1`] = `""`;
exports[`basic serve usage should work with the "--no-hot" option: stderr 1`] = `""`;
exports[`basic serve usage should work with the "--open" option: stderr 1`] = `""`;
exports[`basic serve usage should work with the "--output-public-path" option: stderr 1`] = `
"[webpack-cli] Error: Unknown option '--output-public-path'
[webpack-cli] Run 'webpack --help' to see available commands and options"
`;
exports[`basic serve usage should work with the "--output-public-path" option: stdout 1`] = `""`;
exports[`basic serve usage should work with the "--port" option: stderr 1`] = `""`;
exports[`basic serve usage should work with the "--stats verbose" option: stderr 1`] = `""`;
exports[`basic serve usage should work with the "--stats" option: stderr 1`] = `""`;
exports[`basic serve usage should work with the "stats" option in config: stderr 1`] = `""`;
exports[`basic serve usage should work with the default "publicPath" option: stderr 1`] = `""`;
exports[`basic serve usage should work: stderr 1`] = `""`;