mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
fix: hot reload port should not be hardcoded in case it is used
This commit is contained in:
parent
1f2c8a39a9
commit
23a85d9074
1 changed files with 2 additions and 1 deletions
|
@ -50,6 +50,7 @@ module.exports = async function start(siteDir, cliOptions = {}) {
|
|||
}
|
||||
|
||||
const port = await getPort(cliOptions.port);
|
||||
const hotPort = await getPort(port + 1);
|
||||
const {baseUrl} = props;
|
||||
|
||||
// create compiler from generated webpack config
|
||||
|
@ -79,7 +80,7 @@ module.exports = async function start(siteDir, cliOptions = {}) {
|
|||
logLevel: 'silent'
|
||||
},
|
||||
hotClient: {
|
||||
port: port + 1,
|
||||
port: hotPort,
|
||||
logLevel: 'error'
|
||||
},
|
||||
logLevel: 'error',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue