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

chore: remove webpack from dependency #5076

Merged
merged 1 commit into from
Feb 2, 2021

Conversation

Bobgy
Copy link
Contributor

@Bobgy Bobgy commented Feb 2, 2021

Description of your changes:
Part of #4682

A problem I saw:
renovate updated webpack, but not react-scripts. Then frontend fails to build because each version of react-scripts works with a specific chosen version of webpack.

Change in this PR:
Remove webpack from dependency, and include it via react-scripts's transitive dependency.
In this way, webpack's version will be decided by react-scripts, so they won't be out-of-sync during renovate auto-upgrade.

Checklist:

@Bobgy
Copy link
Contributor Author

Bobgy commented Feb 2, 2021

/assign @zijianjoy
Can you help me review?

@zijianjoy
Copy link
Collaborator

/lgtm
/approve

Thank you Yuan for fixing the dependency versioning issue! Normally I would prefer to see the webpack version being set explicitly (since the version of module bundling tool might affect the build result), but understanding that this is for resolving the renovate dashboard PR issue.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Bobgy, zijianjoy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Bobgy, zijianjoy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Bobgy
Copy link
Contributor Author

Bobgy commented Feb 2, 2021

@zijianjoy For clarification, that was not the only reason. react-scripts is the core package in https://github.com/facebook/create-react-app and create-react-app is a zero-config bundling tool which uses webpack. So we can take create-react-app as the bundling tool interface, while webpack is an implementation detail. When react-scripts choose a webpack version, we should not use a different version.

The reason we included webpack directly before, was because we migrated to create-react-app and the migration didn't update all dependencies cleanly. Ideally, we should remove webpack as direct dependency when we onboarded create-react-app

@google-oss-robot google-oss-robot merged commit 9a7c272 into kubeflow:master Feb 2, 2021
@Bobgy Bobgy deleted the fix_webpack_dep branch February 2, 2021 07:48
@zijianjoy
Copy link
Collaborator

@zijianjoy For clarification, that was not the only reason. react-scripts is the core package in https://github.com/facebook/create-react-app and create-react-app is a zero-config bundling tool which uses webpack. So we can take create-react-app as the bundling tool interface, while webpack is an implementation detail. When react-scripts choose a webpack version, we should not use a different version.

The reason we included webpack directly before, was because we migrated to create-react-app and the migration didn't update all dependencies cleanly. Ideally, we should remove webpack as direct dependency when we onboarded create-react-app

That makes sense, thank you for the clarification!

numerology pushed a commit to numerology/pipelines that referenced this pull request Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants