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

fix: 1.7.3 to 1.7.4 regression #193

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

Conversation

alfredomariamilano
Copy link

Remove the use of the deprecated Webpack MainTemplate. If __nccwpck__ is not present, fall back to __webpack_require__. It fixes the regression from 1.7.3 to 1.7.4 and it also allows for compatibility with rspack.

Remove the use of the deprecated Webpack MainTemplate.
If `__nccwpck__` is not present, fall back to `__webpack_require__`.
It fixes the regression from 1.7.3 to 1.7.4 vercel#188 and it also allows for compatibility with `rspack` https://github.com/web-infra-dev/rspack.
@alfredomariamilano alfredomariamilano changed the title [FIX]: 1.7.3 to 1.7.4 regression fix: 1.7.3 to 1.7.4 regression Oct 8, 2024
@alfredomariamilano alfredomariamilano marked this pull request as draft October 8, 2024 17:46
@alfredomariamilano
Copy link
Author

I'm sorry, I had not run the tests, as it was working as intended. I have a better understanding of how ncc works now and how someone mistakenly made this package compatible only with ncc and broke compatibility with webpack completely.
I have a dirty workaround for this without having to update ncc too and keep this module independent.
I will update the PR tomorrow.

ran and updated all tests
@alfredomariamilano alfredomariamilano marked this pull request as ready for review October 9, 2024 13:49
@alfredomariamilano
Copy link
Author

Unfortunately, all tests had to be reran and rewritten and I kept ncc as a build tool, but I changed the output by reverting ncc's changes to the string __webpack_require__. This makes it dependent on ncc not changing this behaviour again in the future, but considering the two projects are intermingled and the versions are pinned, it shouldn't be a problem.

@styfle
Copy link
Member

styfle commented Oct 11, 2024

Looks like the module ids are different on linux

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