serve devserver on same base path
This commit is contained in:
parent
f32f9caaeb
commit
c7a72b6a04
|
|
@ -125,12 +125,13 @@ export async function installRootRedirect(server: HttpServer, traceUrls: string[
|
|||
for (const reporter of options.reporter || [])
|
||||
params.append('reporter', reporter);
|
||||
|
||||
let baseUrl = './trace/';
|
||||
let baseUrl = '';
|
||||
if (process.env.PW_HMR === '1') {
|
||||
params.set('testServerPort', '' + server.port());
|
||||
baseUrl = 'http://localhost:44223/'; // port is hardcoded in build.js
|
||||
baseUrl = 'http://localhost:44223'; // port is hardcoded in build.js
|
||||
}
|
||||
const urlPath = `${baseUrl}${options.webApp || 'index.html'}?${params.toString()}`;
|
||||
|
||||
const urlPath = `${baseUrl}/trace/${options.webApp || 'index.html'}?${params.toString()}`;
|
||||
|
||||
server.routePath('/', (_, response) => {
|
||||
response.statusCode = 302;
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ steps.push({
|
|||
if (watchMode) {
|
||||
steps.push({
|
||||
command: 'npx',
|
||||
args: ['vite', '--port', '44223'],
|
||||
args: ['vite', '--port', '44223', '--base', '/trace/'],
|
||||
shell: true,
|
||||
cwd: path.join(__dirname, '..', '..', 'packages', 'trace-viewer'),
|
||||
concurrent: true,
|
||||
|
|
|
|||
Loading…
Reference in a new issue