Skip to content

Commit

Permalink
test: don't start proxy during tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lihbr committed Dec 10, 2024
1 parent c8f2086 commit dcdc701
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as path from "node:path"
import process from "node:process"

import akte from "akte/vite"
import getPort from "get-port"
Expand Down Expand Up @@ -71,15 +72,17 @@ export default defineConfig({
{
name: "functions:watch",
async configureServer() {
const port = await getPort({ port: 5174 })
if (process.env.NODE_ENV === "development") {
const port = await getPort({ port: 5174 })

// Ensures we only run the secondary server once
if (port === 5174) {
listenAndWatch("./src/functions.server.ts", {
port,
autoClose: true,
staticDirs: [],
})
// Ensures we only run the secondary server once
if (port === 5174) {
listenAndWatch("./src/functions.server.ts", {
port,
autoClose: true,
staticDirs: [],
})
}
}
},
},
Expand Down

0 comments on commit dcdc701

Please sign in to comment.