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

Bump wp-scripts to 22.1.0 and webpack to v5, and enhance webpack related usages #1333

Closed
8 tasks done
eason9487 opened this issue Mar 17, 2022 · 1 comment · Fixed by #1474
Closed
8 tasks done

Bump wp-scripts to 22.1.0 and webpack to v5, and enhance webpack related usages #1333

eason9487 opened this issue Mar 17, 2022 · 1 comment · Fixed by #1474
Assignees
Labels
type: enhancement The issue is a request for an enhancement. type: technical debt - dependency extraction This issue/PR suffers from the dependency extraction and management type: technical debt - external devX This issue/PR suffers from the ergonomics of external tools/dependencies

Comments

@eason9487
Copy link
Member

eason9487 commented Mar 17, 2022

User story

As a developer, it'd be great

  • if there were more productive development tools.
  • if we could reduce potential security concerns from dependent packages.
  • If we could clear some temporary programs that can be resolved along with the dependent package upgrades.

Describe the solution you'd like

  • Upgrade webpack version to v5.x, which is used by @wordpress/scripts since v18.0.1.
  • Introduce Fast Refresh for React, which is supported in webpack v5 via @wordpress/scripts v20.0.1+. So that the frontend development experience should be improved.
  • Clean up temporary solutions that are no longer needed.

Technical

Shared branch: tweak/1333-wp-scripts-webpack

Stage 1 - Upgrade dependencies

  • Upgrade @wordpress/scripts version to 22.1.0 and other packages that depend on it.
  • Upgrade webpack config version to v5.x.
  • Resolve breaking changes.
  • Resolve linting errors.

Stage 2 - Fast Refresh

  • Introduce Fast Refresh for React.

Stage 3 - Clean up

  • SVG assets resolving and exporting.
  • Clean up unneeded and deduplicate npm packages.
  • Revert 0167ec4 after getting approval and before merging.

Anything else?

Unknowns

Out of bounds/rabbit holes

@eason9487 eason9487 added type: enhancement The issue is a request for an enhancement. type: technical debt - dependency extraction This issue/PR suffers from the dependency extraction and management type: technical debt - external devX This issue/PR suffers from the ergonomics of external tools/dependencies labels Mar 17, 2022
@eason9487 eason9487 self-assigned this Mar 17, 2022
@eason9487
Copy link
Member Author

📝 @woocommerce/eslint-plugin 2.0.0 was released a few days ago. Probably we could upgrade eslint and related packages as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement The issue is a request for an enhancement. type: technical debt - dependency extraction This issue/PR suffers from the dependency extraction and management type: technical debt - external devX This issue/PR suffers from the ergonomics of external tools/dependencies
Projects
None yet
1 participant