electron-log icon indicating copy to clipboard operation
electron-log copied to clipboard

Issues with electron vite and v5 building

Open philjones88 opened this issue 1 year ago • 1 comments

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/@[email protected]/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

philjones88 avatar Feb 06 '24 16:02 philjones88

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

megahertz avatar Feb 06 '24 17:02 megahertz