Skip to content

Commit

Permalink
fix: properly pass vitePluginUsage
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Dec 13, 2024
1 parent 9cb4101 commit f5b520b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions reverse-proxy.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const config: ReverseProxyOptions = {
// to: 'test.local',
// },
],
vitePluginUsage: true,
verbose: false,
}

Expand Down
4 changes: 2 additions & 2 deletions src/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ async function createProxyServer(
export async function setupReverseProxy(options: ProxySetupOptions): Promise<void> {
debugLog('setup', `Setting up reverse proxy: ${JSON.stringify(options)}`, options.verbose)

const { from, to, fromPort, sourceUrl, ssl, verbose, etcHostsCleanup, portManager } = options
const { from, to, fromPort, sourceUrl, ssl, verbose, etcHostsCleanup, vitePluginUsage, portManager } = options
const httpPort = 80
const httpsPort = 443
const hostname = '0.0.0.0'
Expand Down Expand Up @@ -521,7 +521,7 @@ export async function setupReverseProxy(options: ProxySetupOptions): Promise<voi
log.info(`You can use 'sudo lsof -i :${targetPort}' (Unix) or 'netstat -ano | findstr :${targetPort}' (Windows) to check what's using the port.`)
}

await createProxyServer(from, to, fromPort, finalPort, hostname, sourceUrl, ssl, verbose)
await createProxyServer(from, to, fromPort, finalPort, hostname, sourceUrl, ssl, vitePluginUsage, verbose)
}
catch (err) {
debugLog('setup', `Setup failed: ${err}`, verbose)
Expand Down

0 comments on commit f5b520b

Please sign in to comment.