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

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default #100

Open
venkatpoluri opened this issue Dec 15, 2022 · 4 comments

Comments

@venkatpoluri
Copy link

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 }

@ewoudenberg
Copy link
Collaborator

Thank you @venkatpoluri -- this is a bit out of my league -- can you help by providing a PR to fix this? -Thank you.

@JasonXian
Copy link

This is a Webpack build issue, not related to the package.

An easy fix here would be to install this plugin in any dependent application: https://www.npmjs.com/package/node-polyfill-webpack-plugin

@mattluttrell
Copy link

Another vote for a solution on this one.

My relevant package.json:
"@ionic/core": "^6.2.7",
"@ionic/vue": "^6.2.7",
"@types/json-diff": "^1.0.0", (thank you for this package)
"json-diff": "^1.0.6",
"vue": "^3.2.39",
"webpack": "^5.74.0"

@ewoudenberg
Copy link
Collaborator

ewoudenberg commented Aug 22, 2023

Dear JSON-diff users:

If anyone can provide a pull request for this feature, I would be happy to merge and publish it. The proper fix for this is a bit beyond my JS tool chain skills.

Thank you,
Eric

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

No branches or pull requests

4 participants