@@ -19,6 +19,7 @@ module.exports = (api, options) => {
19
19
options : {
20
20
'--open' : `open browser on server start` ,
21
21
'--copy' : `copy url to clipboard on server start` ,
22
+ '--noinstructions' : `disable logging instructions on first compilation complete and on every HMR recompilation` ,
22
23
'--mode' : `specify env mode (default: development)` ,
23
24
'--host' : `specify host (default: ${ defaults . host } )` ,
24
25
'--port' : `specify port (default: ${ defaults . port } )` ,
@@ -206,43 +207,47 @@ module.exports = (api, options) => {
206
207
}
207
208
}
208
209
209
- const networkUrl = publicUrl
210
- ? publicUrl . replace ( / ( [ ^ / ] ) $ / , '$1/' )
211
- : urls . lanUrlForTerminal
212
-
213
- console . log ( )
214
- console . log ( ` App running at:` )
215
- console . log ( ` - Local: ${ chalk . cyan ( urls . localUrlForTerminal ) } ${ copied } ` )
216
- if ( ! isInContainer ) {
217
- console . log ( ` - Network: ${ chalk . cyan ( networkUrl ) } ` )
218
- } else {
210
+ if ( ! args . noinstructions ) {
211
+ const networkUrl = publicUrl
212
+ ? publicUrl . replace ( / ( [ ^ / ] ) $ / , '$1/' )
213
+ : urls . lanUrlForTerminal
214
+
219
215
console . log ( )
220
- console . log ( chalk . yellow ( ` It seems you are running Vue CLI inside a container.` ) )
221
- if ( ! publicUrl && options . publicPath && options . publicPath !== '/' ) {
222
- console . log ( )
223
- console . log ( chalk . yellow ( ` Since you are using a non-root publicPath, the hot-reload socket` ) )
224
- console . log ( chalk . yellow ( ` will not be able to infer the correct URL to connect. You should` ) )
225
- console . log ( chalk . yellow ( ` explicitly specify the URL via ${ chalk . blue ( `devServer.public` ) } .` ) )
216
+ console . log ( ` App running at:` )
217
+ console . log ( ` - Local: ${ chalk . cyan ( urls . localUrlForTerminal ) } ${ copied } ` )
218
+ if ( ! isInContainer ) {
219
+ console . log ( ` - Network: ${ chalk . cyan ( networkUrl ) } ` )
220
+ } else {
226
221
console . log ( )
222
+ console . log ( chalk . yellow ( ` It seems you are running Vue CLI inside a container.` ) )
223
+ if ( ! publicUrl && options . publicPath && options . publicPath !== '/' ) {
224
+ console . log ( )
225
+ console . log ( chalk . yellow ( ` Since you are using a non-root publicPath, the hot-reload socket` ) )
226
+ console . log ( chalk . yellow ( ` will not be able to infer the correct URL to connect. You should` ) )
227
+ console . log ( chalk . yellow ( ` explicitly specify the URL via ${ chalk . blue ( `devServer.public` ) } .` ) )
228
+ console . log ( )
229
+ }
230
+ console . log ( chalk . yellow ( ` Access the dev server via ${ chalk . cyan (
231
+ `${ protocol } ://localhost:<your container's external mapped port>${ options . publicPath } `
232
+ ) } `) )
227
233
}
228
- console . log ( chalk . yellow ( ` Access the dev server via ${ chalk . cyan (
229
- `${ protocol } ://localhost:<your container's external mapped port>${ options . publicPath } `
230
- ) } `) )
234
+ console . log ( )
231
235
}
232
- console . log ( )
233
236
234
237
if ( isFirstCompile ) {
235
238
isFirstCompile = false
236
239
237
- if ( ! isProduction ) {
238
- const buildCommand = hasProjectYarn ( api . getCwd ( ) ) ? `yarn build` : hasProjectPnpm ( api . getCwd ( ) ) ? `pnpm run build` : `npm run build`
239
- console . log ( ` Note that the development build is not optimized.` )
240
- console . log ( ` To create a production build, run ${ chalk . cyan ( buildCommand ) } .` )
241
- } else {
242
- console . log ( ` App is served in production mode.` )
243
- console . log ( ` Note this is for preview or E2E testing only.` )
240
+ if ( ! args . noinstructions ) {
241
+ if ( ! isProduction ) {
242
+ const buildCommand = hasProjectYarn ( api . getCwd ( ) ) ? `yarn build` : hasProjectPnpm ( api . getCwd ( ) ) ? `pnpm run build` : `npm run build`
243
+ console . log ( ` Note that the development build is not optimized.` )
244
+ console . log ( ` To create a production build, run ${ chalk . cyan ( buildCommand ) } .` )
245
+ } else {
246
+ console . log ( ` App is served in production mode.` )
247
+ console . log ( ` Note this is for preview or E2E testing only.` )
248
+ }
249
+ console . log ( )
244
250
}
245
- console . log ( )
246
251
247
252
if ( args . open || projectDevServerOptions . open ) {
248
253
const pageUri = ( projectDevServerOptions . openPage && typeof projectDevServerOptions . openPage === 'string' )
0 commit comments