-
Notifications
You must be signed in to change notification settings - Fork 667
Fix errors due to Lodash module replacement #1766
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 errors due to Lodash module replacement #1766
Conversation
|
@vojtechszocs: GitHub didn't allow me to request PR reviews from the following users: mareklibra. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/retest |
spadgett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: spadgett, vojtechszocs The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
5 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/hold |
|
Holding to keep the bot from retesting until the previous test namespace is deleted |
|
/retest |
|
/hold cancel |
This PR fixes a problem with Lodash module replacement during webpack build.
The standard Lodash import style used in Console is
with both
_objects having an equivalent structure.Problem 1, is structural difference between
lodash/foovs.lodash-es/fooimportsProblem 2, is the weird-looking
lodash.fooform used by some vendor librariesTherefore, the replacement RegExp is changed to
/^lodash$/.This also means that parts of
lodash(technically a separate library) will make it into webpack-generated chunks, due to vendor libraries using eitherlodash/fooorlodash.foo. I don't think we can do anything about this.Note: from webpack compilation perspective, using
in source code vs. using
in source code together with
/^lodash$/=>lodash-esreplacement should yield the same results./cc @spadgett @mareklibra