Skip to content

Commit 51705ff

Browse files
committed
chore: tweak
1 parent 6f7df78 commit 51705ff

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

index.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ exports.when = api => api.args.has('s') || api.args.has('serve')
88

99
exports.apply = api => {
1010
/**
11-
* Disable poi open browser behavior
11+
* Prepare arguments for open browser
1212
*/
13-
const {
14-
args,
15-
config: { devServer }
16-
} = api
17-
const { host, port } = devServer
13+
const { args, config } = api
14+
const { host, port } = config.devServer
1815
const isUnspecifiedHost = host === '0.0.0.0' || host === '::'
1916
const prettyHost = isUnspecifiedHost ? 'localhost' : host
20-
delete devServer.open
17+
18+
/**
19+
* Make poi lose ability to open browser
20+
*/
21+
delete config.devServer.open
2122

2223
console.log()
2324
console.log('You can now view your app in the browser:')

0 commit comments

Comments
 (0)