-
Notifications
You must be signed in to change notification settings - Fork 29
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
Blank preferences, errors running "build". Compatibility with @electron-forge/plugin-webpack ? #207
Comments
By the way, I encountered an additional error when integrating into my existing application, however I could not reproduce this when creating a project from template as in the above instructions:
That gets printed to console when There is no reference to |
Hi @thehans For my projects I also use electron-forge so it should definitely be able to work. Having a quick look at the last error message you've sent it seems like an issue with the webpack plugin. Anyway, I will try to reproduce the issue with the steps you mentioned above and see what we can do to avoid this issue. Weird thing there is that I don't see an actual error message pointing to electron-preferences. But please be patient, I don't have unlimited time :) |
Hello. I ran into a same problem as you. Is there some way to solve it? |
I was never able to solve it. Ended up creating my own fields for the
preferences and updating them using the API methods.
…On Sat, Nov 18, 2023, 7:58 PM David Krásný ***@***.***> wrote:
Hello. I ran into a same problem as you. Is there some way to solve it?
—
Reply to this email directly, view it on GitHub
<#207 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGOQCFO34KRP3QUJLGBILLYFFRVZAVCNFSM6AAAAAA4VP46SGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXG4YTONZRGA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sorry for the late response. Last time I was able to reproduce the issue, but didn't have the time to find a decent workaround. The issue lies within the webpack bundling of electron-forge which tree shakes the modules and ignores what's defined in the Meanwhile I've found a workaround for now, but I would love to find an even better solution which fixes this all 'automagically'. For now you can add the
Can you guys verify this workaround fixes your issue? |
Personally I use electron-builder for my project (crossover) |
Describe the bug
I have been able to run the Demo
example
code which is included in this repository,but when adding to my existing electron project which uses
electron-forge
and it's webpack plugin@electron-forge/plugin-webpack
then
preferences.show()
just opens an empty window.To Reproduce
I started with an electron-forge template and tried to make minimal edits to add basic preferences:
npm init electron-app@latest preferences-test -- --template=webpack
cd preferences-test && npm install electron-preferences
const preferences = new ElectronPreferences({ ...
preferences.show()
to theapp.on('ready'
handler in main.jsI'm not sure if I'm supposed to run the same
npm run build
command from the Demo / example in an external project like this, but attempting that results in many errors which I don't understand.Expected behavior
Visible preferences
Machine (please complete the following information):
Additional context
I can upload this sample project as a new GitHub repo if it's any help. Let me know.
The text was updated successfully, but these errors were encountered: