Skip to content

Commit

Permalink
Edit the correct file.
Browse files Browse the repository at this point in the history
  • Loading branch information
caalador committed Nov 2, 2021
1 parent 6cedc82 commit ff1763e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions flow-server/src/main/resources/vite.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,10 @@ function updateTheme(contextPath: string) {
}

function runWatchDog(watchDogPort) {
console.log("Starting on port:", watchDogPort);
const client = net.Socket();
client.setEncoding('utf8');
client.on('error', function () {
console.log("Watchdog connection error. Terminating webpack process...");
console.log("Watchdog connection error. Terminating vite process...");
client.destroy();
process.exit(0);
});
Expand All @@ -72,9 +71,9 @@ function runWatchDog(watchDogPort) {
}

export const vaadinConfig:UserConfigFn = (env) => {
console.log("Executing in", env.mode);
console.log("watchdogport", process.env.watchDogPort);
if (env.mode === 'development' && process.env.watchDogPort) {
// Open a connection with the Java dev-mode handler in order to finish
// vite when it exits or crashes.
runWatchDog(process.env.watchDogPort);
}
return ({
Expand Down

0 comments on commit ff1763e

Please sign in to comment.