Let Boards/Product dev servers run on default ports (#23257)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f28a2bcca7
Коммит
11b08edf94
@@ -189,17 +189,24 @@ config.plugins.push(new webpack.DefinePlugin({
|
||||
if (NPM_TARGET === 'start:product') {
|
||||
const url = new URL(process.env.MM_BOARDS_DEV_SERVER_URL ?? 'http://localhost:9006');
|
||||
|
||||
const protocol = url.protocol.substring(0, url.protocol.length - 1);
|
||||
const hostname = url.hostname;
|
||||
let port = url.port;
|
||||
if (!port) {
|
||||
port = protocol === 'https' ? '443' : '80';
|
||||
}
|
||||
|
||||
config.devServer = {
|
||||
server: {
|
||||
type: url.protocol.substring(0, url.protocol.length - 1),
|
||||
type: protocol,
|
||||
options: {
|
||||
minVersion: process.env.MM_SERVICESETTINGS_TLSMINVER ?? 'TLSv1.2',
|
||||
key: process.env.MM_SERVICESETTINGS_TLSKEYFILE,
|
||||
cert: process.env.MM_SERVICESETTINGS_TLSCERTFILE,
|
||||
},
|
||||
},
|
||||
host: url.hostname,
|
||||
port: url.port,
|
||||
host: hostname,
|
||||
port,
|
||||
devMiddleware: {
|
||||
writeToDisk: false,
|
||||
},
|
||||
|
||||
@@ -137,17 +137,24 @@ config.output = {
|
||||
if (NPM_TARGET === 'start:product') {
|
||||
const url = new URL(process.env.MM_PLAYBOOKS_DEV_SERVER_URL ?? 'http://localhost:9007');
|
||||
|
||||
const protocol = url.protocol.substring(0, url.protocol.length - 1);
|
||||
const hostname = url.hostname;
|
||||
let port = url.port;
|
||||
if (!port) {
|
||||
port = protocol === 'https' ? '443' : '80';
|
||||
}
|
||||
|
||||
config.devServer = {
|
||||
server: {
|
||||
type: url.protocol.substring(0, url.protocol.length - 1),
|
||||
type: protocol,
|
||||
options: {
|
||||
minVersion: process.env.MM_SERVICESETTINGS_TLSMINVER ?? 'TLSv1.2',
|
||||
key: process.env.MM_SERVICESETTINGS_TLSKEYFILE,
|
||||
cert: process.env.MM_SERVICESETTINGS_TLSCERTFILE,
|
||||
},
|
||||
},
|
||||
host: url.hostname,
|
||||
port: url.port,
|
||||
host: hostname,
|
||||
port,
|
||||
devMiddleware: {
|
||||
writeToDisk: false,
|
||||
},
|
||||
|
||||
Ссылка в новой задаче
Block a user