-
Notifications
You must be signed in to change notification settings - Fork 128
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
Unable to transform arrow inside class property #156
Comments
Bytecode protection requires converting class A {
handle = (x = 0) => {
console.log(x);
};
} The above example has a problem with conversion. This is a related bug of babel. The solution is to use normal functions or as follows: class A {
async handle(x = 0) {
console.log(x);
};
} |
But I don't even have classes in my code ... |
Install related modules in |
can you expand please, i have the same issue but it is from an NPM package. |
in my case, it's this package https://github.com/megahertz/electron-log/blob/master/src/node/EventLogger.js#L8 that breaks my build |
@philjones88 So, how did you ultimately solve it? |
I mannuly modified source code for electron-log, and it worked |
@duyixian1234 thank you, it works well😃 |
Describe the bug
When I run
electron-vite dev --watch
, the application runs fine.But when its run with
electron-vite build
I get the following:My
electron.vite.config.mjs
looks like this:I thought it was a babel issue babel/babel#15613
but now I'm not so sure...
Electron-Vite Version
1.0.22
Electron Version
24.2.0
Vite Version
4.3.4
Validations
There was a similar issue actually, 使用bytecodePlugin插件构建报错 #60
related to bytecode plugin. Taking that out from the config, fixes the problem.
The text was updated successfully, but these errors were encountered: