megahertz / electron-log

Simple logging module Electron/Node.js/NW.js application. No dependencies. No complicated configuration.
MIT License
1.27k stars 124 forks source link

Issues with electron vite and v5 building #401

Open philjones88 opened 5 months ago

philjones88 commented 5 months ago

I tried bumping from v4.4.8 to v5.1.0 but have come across this when trying to use this library with electron vite:

SyntaxError: unknown file: Unable to transform arrow inside class property
  1513 |      formatters = {
  1514 |        app: {
> 1515 |          'certificate-error': ({ args }) => {
       |                               ^
  1516 |            return this.arrayToObject(args.slice(1, 4), [
  1517 |              'url',
  1518 |              'error',
at File.buildCodeFrameError (/Users/philjones/Documents/work/foo/electron/node_modules/.pnpm/@babel+core@7.23.9/node_modules/@babel/core/lib/transformation/file/file.js:205:12)

electron vite has a bytecode plugin that has restriction on input code that it runs through babel.

related: https://github.com/alex8088/electron-vite/issues/156 see: https://electron-vite.org/guide/source-code-protection

megahertz commented 5 months ago

Sorry, but I can't help with that. I have no plans to transpile the library at least until version 6.