Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

electron-log transported console output with no styles #236

Closed
4 tasks done
xzifan opened this issue Jul 28, 2023 · 2 comments
Closed
4 tasks done

electron-log transported console output with no styles #236

xzifan opened this issue Jul 28, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@xzifan
Copy link

xzifan commented Jul 28, 2023

Describe the bug

As i tried to start the electron instance with electron-vite, the console could not transport the output with colors.
image

I did a bit research about it and I guess the styles were lost when converted from startElectron src/electron.ts#L139.

It would work as I expected if I make this change.

-  const ps = spawn(electronPath, ['.'].concat(args))
+  const ps = spawn(electronPath, ['.'].concat(args), {stdio: 'inherit'})
-  ps.stdout.on('data', chunk => {
-  !inspect && chunk.toString().trim() && logger.info(chunk.toString())
-  })
-  ps.stderr.on('data', chunk => {
-    !inspect && chunk.toString().trim() && logger.error(chunk.toString())
-  })
+  // !inspect && chunk.toString().trim() && logger.info(chunk.toString())
+  // })
+  // ps.stderr.on('data', chunk => {
+  //  !inspect && chunk.toString().trim() && logger.error(chunk.toString())
+  //})

Electron-Vite Version

1.0.22

Electron Version

19.0.0

Vite Version

4.0.0

Validations

@alex8088 alex8088 added the bug Something isn't working label Jul 28, 2023
@alex8088
Copy link
Owner

@xzifan Thanks for your feedback, this issue will be fixed soon.

@alex8088
Copy link
Owner

new ver 1.0.26 is out 🎉

fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants