Repository navigation
|
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: |
Answered by
nklayman
Sep 25, 2021
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. |
0 replies
Answer selected by
nklayman
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to 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.