-
Hello there! I'm trying to use Public Class attributes in a preload.js script. When I run
This seems to indicate that this javascript feature is not supported. It's strange, because I can use this feature anywhere else in the app. In the frontend app via webpack/babel and in my background script it's supported via nodejs. How can I enable this feature for my preload script? For the record I've registed the script as follows:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is because the preload.js file isn't transpiled with babel by default. You need to enable it for the main process, see #204 (comment) for details. It's for class properties specifically but it should be simple to get it to work for your usecase. |
Beta Was this translation helpful? Give feedback.
This is because the preload.js file isn't transpiled with babel by default. You need to enable it for the main process, see #204 (comment) for details. It's for class properties specifically but it should be simple to get it to work for your usecase.