Skip to content

Commit 8997c86

Browse files
Strip special characters from vite output (#6588)
Fix issue #5561 emulators not starting with vite --------- Co-authored-by: Viktor Sotov <[email protected]> Co-authored-by: sotovviktor <[email protected]>
1 parent ed13fde commit 8997c86

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
- Fix an issue preventing Vite applications from being emulated on Windows. (#6411)
12
- Addressed an issue preventing Astro applications from being deployed from Windows. (#5709)
23
- Fixed an issue preventing Angular apps using ng-deploy from being emulated or deployed. (#6584)
34
- Warn if a Web Framework is outside a well known version range on deploy/emulate. (#6562)
45
- Use Web Framework's well known version range in `firebase init hosting`. (#6562)
5-
- Limit Web Framework's generated Cloud Function name to 20 characters, fixing deploys for some. (#6260)
6+
- Limit Web Framework's generated Cloud Function name to 23 characters, fixing deploys for some. (#6260)

src/frameworks/vite/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { spawn } from "cross-spawn";
33
import { existsSync } from "fs";
44
import { copy, pathExists } from "fs-extra";
55
import { join } from "path";
6+
import stripAnsi from "strip-ansi";
67
import { FrameworkType, SupportLevel } from "../interfaces";
78
import { promptOnce } from "../../prompt";
89
import {
@@ -105,7 +106,8 @@ export async function getDevModeHandle(dir: string) {
105106
const serve = spawn(cli, [], { cwd: dir });
106107
serve.stdout.on("data", (data: any) => {
107108
process.stdout.write(data);
108-
const match = data.toString().match(/(http:\/\/.+:\d+)/);
109+
const dataWithoutAnsiCodes = stripAnsi(data.toString());
110+
const match = dataWithoutAnsiCodes.match(/(http:\/\/.+:\d+)/);
109111
if (match) resolve(match[1]);
110112
});
111113
serve.stderr.on("data", (data: any) => {

0 commit comments

Comments
 (0)