Page MenuHomePhabricator

Modernize build dependencies in WP repo
Closed, ResolvedPublic

Description

The various npm tasks (test, build, dev, etc) are currently broken with most, maybe all, versions of node > 12.21. WE have to bring this repo back to a working state in order to unblock other tasks such as T348261.

We can take this opportunity to modernize the stack and clean up the output. Specifically

  • Use Vite instead of Webpack
  • Have the build output one js file, one css file, and all the images

QA Results - WordPress Dev

Related Objects

Event Timeline

SBisson triaged this task as High priority.Nov 7 2023, 3:49 PM
PWaigi-WMF changed the task status from Open to In Progress.Nov 17 2023, 5:34 PM
hueitan subscribed.

related PR:

Specific Node version prior to this fix
https://github.com/wikimedia/wikipedia-preview/pull/179

after this fix, we need to update wordpress plugin
https://github.com/wikimedia/wikipediapreview-wordpress/pull/101

@eamedina When running through some regression testing, I did not come across any new issues. I will move this to design sign-off. Thanks for all your work!

Status: ✅PASS
Environment: WordPress Dev 6.4.2; Wikipedia Preview: commit f8134c6ac58618bd0c9eef77697a59b53cd8ca7e - Mon Dec 11 14:50:53 2023 -0500
OS: macOS Sonoma 14.2
Browser: Chrome 120, Firefox 120, Safari 17.2, Edge 120
Skins. N/A
Device: MBA M2
Emulated Device:: n/a
Test Links:
http://dev-test.local/wp-admin/post.php?post=27&action=edit
http://dev-test.local/27-2/

✅AC1: https://phabricator.wikimedia.org/T350698 - Regression Testing

EditPost
2023-12-21_14-31-11.png (894×2 px, 174 KB)
2023-12-21_14-31-28.png (1×1 px, 292 KB)