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

PLANET-7393: Update webpack to v5 #2188

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

PLANET-7393: Update webpack to v5 #2188

wants to merge 1 commit into from

Conversation

lithrel
Copy link
Member

@lithrel lithrel commented Jan 8, 2024

Ref: https://jira.greenpeace.org/browse/PLANET-7393

Update Webpack to match Gutenberg and be able to use up-to-date packages.

Update dev log

Updated

  • webpack 4.40.2 -> 5.89.0
  • @wordpress/scripts 3.3.0 -> 26.19.0 // matching gutenberg
  • ajv x -> 8.7.1 // matching gutenberg, required to fix version after packages update
  • postcss-loader 3.0.0 -> 8.4.16 // matching gutenberg
  • sass 1.57.1 -> 1.69.7 // last version
  • sass-loader 8.0.0 -> 13.3.3 // last version
  • css-loader 3.6.0 -> 6.8.1 // last version
  • mini-css-extract-plugin 0.8.2 -> 2.7.6 // last version
  • terser-webpack-plugin 2.2.1 -> 5.3.9 // last version

Added

  • postcss 8.4.16 // required by postcss-loader
  • @wordpress/elements 5.25.0 // explicit dependency after removal of defaultConfig
  • @wordpress/block-editor 12.16.0 // explicit dependency after removal of defaultConfig
  • css-minimizer-webpack-plugin 5.0.1 // recommended to replace optimize-css-assets-webpack-plugin
  • babel-loader 8.2.3 // explicit dependency after removal of defaultConfig

Removed

  • webpack-fix-style-only-entries // not working with webpack 5, not maintained
  • optimize-css-assets-webpack-plugin // not working with webpack 5
  • remove-files-webpack-plugin // not needed

Changed

  • specified mode and devtool for webpack config
  • CI resource class to create zip file is now large
    webpack 5 seems to take more time and ressources, job was crashing randomly

Test

> npm install --legacy-peer-deps
> npm start

@lithrel lithrel self-assigned this Jan 8, 2024
planet-4 added a commit to greenpeace/planet4-test-pandora that referenced this pull request Jan 8, 2024
/unhold 1292e0a3-7396-405d-8c77-4ff3b34f9c57
lithrel pushed a commit to greenpeace/planet4-test-pandora that referenced this pull request Jan 8, 2024
/unhold 1292e0a3-7396-405d-8c77-4ff3b34f9c57
@planet-4
Copy link
Contributor

planet-4 commented Jan 8, 2024

Test instance is ready 🚀

🌑 phoebe | admin | blocks report | CircleCI | composer-local.json

⌚ 2024.03.07 15:34:37

planet-4 added a commit to greenpeace/planet4-test-pandora that referenced this pull request Jan 9, 2024
/unhold 50c5bae8-695b-4458-a795-bcd835b513ac
@lithrel lithrel force-pushed the update/webpack5 branch 2 times, most recently from 45602b1 to cb4e570 Compare January 9, 2024 12:02
planet-4 added a commit to greenpeace/planet4-test-pandora that referenced this pull request Jan 9, 2024
/unhold b3ce6e54-246f-4241-99d4-288b2cc8f561
planet-4 added a commit to greenpeace/planet4-test-pandora that referenced this pull request Jan 9, 2024
/unhold d0db63e5-a419-45cc-bcaa-f24039c926c5
planet-4 added a commit to greenpeace/planet4-test-pandora that referenced this pull request Jan 10, 2024
/unhold f8ac3456-ccc5-429e-b826-db68b761ac5b
@lithrel lithrel changed the title Update webpack to v5 PLANET-7393: Update webpack to v5 Jan 12, 2024
@lithrel lithrel force-pushed the update/webpack5 branch 2 times, most recently from 7c562d6 to dfce86c Compare January 12, 2024 22:22
planet-4 added a commit to greenpeace/planet4-test-phoebe that referenced this pull request Jan 12, 2024
/unhold 2a75518b-5563-495b-be17-72ec42d51f75
@lithrel lithrel force-pushed the update/webpack5 branch 4 times, most recently from b4344ff to fdb3385 Compare February 16, 2024 12:18
planet-4 added a commit to greenpeace/planet4-test-phoebe that referenced this pull request Feb 16, 2024
/unhold 493a6910-63a5-4011-b43e-a5c399b18517
@lithrel lithrel force-pushed the update/webpack5 branch 3 times, most recently from ec68c55 to 5c3837f Compare February 19, 2024 15:13
planet-4 added a commit to greenpeace/planet4-test-phoebe that referenced this pull request Feb 19, 2024
/unhold 440c5ab2-8171-44f8-b0dc-b07a64dd4fff
planet-4 added a commit to greenpeace/planet4-test-phoebe that referenced this pull request Feb 19, 2024
/unhold 96ef9f05-f146-4c89-b675-7231fe6e1c39
planet-4 added a commit to greenpeace/planet4-test-phoebe that referenced this pull request Feb 19, 2024
/unhold bb4abb39-a86c-4a6c-acc8-c46aa2581034
planet-4 added a commit to greenpeace/planet4-test-phoebe that referenced this pull request Feb 19, 2024
/unhold ff24eddb-6a54-4ce5-bb33-567325585174
planet-4 added a commit to greenpeace/planet4-test-phoebe that referenced this pull request Feb 19, 2024
/unhold 61764edd-72a3-417c-9807-0e81c5f15b0c
planet-4 added a commit to greenpeace/planet4-test-phoebe that referenced this pull request Feb 28, 2024
/unhold 8ad099bc-386f-4f4b-93dd-7773b5b05325
planet-4 added a commit to greenpeace/planet4-test-phoebe that referenced this pull request Mar 7, 2024
/unhold 19147cc1-e962-4b5e-b8bc-393ca797f8fc
planet-4 added a commit to greenpeace/planet4-test-phoebe that referenced this pull request Mar 7, 2024
/unhold 998dab7b-32ef-4a2e-a629-786c408c7939
@mleray mleray self-assigned this Jun 6, 2024
@mleray mleray force-pushed the update/webpack5 branch 7 times, most recently from 6444690 to b9a1c16 Compare June 7, 2024 11:51
Update webpack and packages
Update webpack config to match requirements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants