Skip to content
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

Breaks with @electron-forge/plugin-webpack 6.4.2 #33

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

PascalPixel
Copy link

@PascalPixel PascalPixel commented Nov 15, 2023

package works with @electron-forge/plugin-webpack at ^6.4.1, but breaks with ^6.4.2

6.4.2 changed how forge's webpack plugin decides targets

@PascalPixel PascalPixel changed the title upgrades Breaks with @electron-forge/plugin-webpack 6.4.2 Nov 15, 2023
@jjeff
Copy link
Contributor

jjeff commented Nov 15, 2023

First, thanks for the PR!

It looks like the tests aren't passing due to errors like this:

ERROR in ./node_modules/bytenode/lib/index.js 3:15-39
Module not found: Error: Can't resolve 'assert' in '/home/runner/work/electron-bytenode-example/electron-bytenode-example/node_modules/bytenode/lib'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
	- add a fallback 'resolve.fallback: { "assert": require.resolve("assert/") }'
	- install 'assert'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "assert": false }
 @ ./src/renderer/preload.loader.js 1:0-19

I'm guessing we're going to need to add resolve.fallback parameters in the webpack configs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants