feat: fix webpack 5 compatibility issue in webpack.base.js#293
Merged
feat: fix webpack 5 compatibility issue in webpack.base.js#293
Conversation
|
|
…h resolve.fallback Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix CI error in workflow execution
Fix webpack 5 compatibility issue in webpack.base.js
Oct 12, 2025
github-actions bot
pushed a commit
that referenced
this pull request
Oct 12, 2025
# [1.0.0](v0.5.1...v1.0.0) (2025-10-12) ### Features * fix CI error by removing --fix flag from lint script ([#297](#297)) ([4b6eccd](4b6eccd)) * fix CI error by requiring Node.js 20+ ([#300](#300)) ([b598665](b598665)) * fix CI error by updating to Node.js 20 ([1a3ce51](1a3ce51)) * fix CI error by updating to Node.js 20 in semantic-release ([#295](#295)) ([32fd7ae](32fd7ae)) * fix webpack 5 compatibility issue in webpack.base.js ([#293](#293)) ([2f857e2](2f857e2)) * regenerate yarn.lock ([18ff623](18ff623)) * trigger v1.0.0 major release ([#291](#291)) ([1153e94](1153e94)) * update Node.js version to 18 and 20 in CI ([#289](#289)) ([f14072a](f14072a)) * Update README badges ([#287](#287)) ([971e664](971e664)) ### BREAKING CHANGES * trigger v1.0.0 major release
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
The CI build was failing with the following error:
See: https://github.com/casbin/casbin.js/actions/runs/18438978328/job/52536865021
Root Cause
The webpack configuration in
webpack.base.jswas using the deprecated webpack 4 optionnode.fs: "empty". This option was removed in webpack 5 and is no longer supported.Solution
Updated the webpack configuration to use the webpack 5 compatible approach by replacing:
with:
According to the webpack 5 migration guide, polyfills for Node.js core modules are no longer automatically included and must be explicitly configured via
resolve.fallback.Verification
This minimal change ensures compatibility with webpack 5 while maintaining all existing functionality.
Original prompt
Fixes #292
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.