Scripts: Update webpack and related dependencies to the latest version#54657
Scripts: Update webpack and related dependencies to the latest version#54657
Conversation
|
Size Change: +4.68 kB (0%) Total Size: 1.63 MB
ℹ️ View Unchanged
|
63d5724 to
b013aa7
Compare
|
@desrosj, applying similar changes in the WordPress core would be great shortly before or even after Beta 1. |
b013aa7 to
6fb6f79
Compare
This includes Webpack and React related updates to accompany WordPress/gutenberg#54657.
|
I've created WordPress/wordpress-develop#5264 to accompany this change. Like this PR, there seems to be very minimal changes required, and there are no drastic changes to any built output. |
|
For the |
|
|
||
| exports[`ReadableJsAssetsWebpackPlugin should produce the expected output: Asset file view.js should match snapshot 1`] = ` | ||
| "/******/ (() => { // webpackBootstrap | ||
| "/******/ (function() { // webpackBootstrap |
There was a problem hiding this comment.
Weird, I though arrow support was good enough :P
There was a problem hiding this comment.
There might be a reason why webpack wraps code with a regular function now 🤷🏻
youknowriad
left a comment
There was a problem hiding this comment.
It's cool that we're now able to update webpack without too much hassle :)
…ersions. This updates the following npm dependencies: - `autoprefixer` to version `10.4.16`. - `grunt-contrib-qunit` to version `8.0.1`. - `postcss` to version `8.4.30`. - `react-refresh` to version `0.14.0`. - `sass` to version `1.68.0`. - `sinon` to version `16.0.0`. - `uuid` to version `9.0.1`. - `tslib` to version `2.6.2`. This change accompanies a similar one in the Gutenberg repository: WordPress/gutenberg#54657. Props gziolo, desrosj. Fixes #58863. git-svn-id: https://develop.svn.wordpress.org/trunk@56647 602fd350-edb4-49c9-b593-d223f7449a82
…ersions. This updates the following npm dependencies: - `autoprefixer` to version `10.4.16`. - `grunt-contrib-qunit` to version `8.0.1`. - `postcss` to version `8.4.30`. - `react-refresh` to version `0.14.0`. - `sass` to version `1.68.0`. - `sinon` to version `16.0.0`. - `uuid` to version `9.0.1`. - `tslib` to version `2.6.2`. This change accompanies a similar one in the Gutenberg repository: WordPress/gutenberg#54657. Props gziolo, desrosj. Fixes #58863. Built from https://develop.svn.wordpress.org/trunk@56647 git-svn-id: https://core.svn.wordpress.org/trunk@56159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…ersions. This updates the following npm dependencies: - `autoprefixer` to version `10.4.16`. - `grunt-contrib-qunit` to version `8.0.1`. - `postcss` to version `8.4.30`. - `react-refresh` to version `0.14.0`. - `sass` to version `1.68.0`. - `sinon` to version `16.0.0`. - `uuid` to version `9.0.1`. - `tslib` to version `2.6.2`. This change accompanies a similar one in the Gutenberg repository: WordPress/gutenberg#54657. Props gziolo, desrosj. Fixes #58863. Built from https://develop.svn.wordpress.org/trunk@56647 git-svn-id: http://core.svn.wordpress.org/trunk@56159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…ersions. This updates the following npm dependencies: - `autoprefixer` to version `10.4.16`. - `grunt-contrib-qunit` to version `8.0.1`. - `postcss` to version `8.4.30`. - `react-refresh` to version `0.14.0`. - `sass` to version `1.68.0`. - `sinon` to version `16.0.0`. - `uuid` to version `9.0.1`. - `tslib` to version `2.6.2`. This change accompanies a similar one in the Gutenberg repository: WordPress/gutenberg#54657. Props gziolo, desrosj. Fixes #58863. git-svn-id: https://develop.svn.wordpress.org/trunk@56647 602fd350-edb4-49c9-b593-d223f7449a82
What?
Let's bring webpack and related dependencies to the latest version and apply them to WordPress core around 6.4 Beta 1:
webpackupdated to the latest versionbrowserslistandcaniuse-liteupdated to the latest versionreact-refreshupdated to the latest versionIn addition, it tries to fix #53552 caused by the outdated version of
webpack-cli:Why?
How?
It brings
webpack-clito the latest version. There were some breaking changes in v5.0.0, but they don't seem to have impact like:--hotoption in favor of directly using theHotModuleReplacementplugin (only for build command, for serve it will work). I don't see the listed deprecated packages in the lock file anymore.There was a recent version bump enforced for the
webpackin the repository with #49075, so here we follow-up with another version bump that also gets applied to@wordpress/scripts.Testing Instructions
nvm useto switch to the currently supported Node.js and npm versions.npm installto install the latest version of dependencies.npm run buildand confirm the the build finishes correctly.npx wp-create-block example-static --no-wp-scriptsto confirm that Create Block still works.cd example-staticeto enter the newly created project.../node_modules/.bin/wp-scripts start --hotto confirm that you can develop blocks with the dev server.editfunction. See that the block gets automatically updated in the post editor after saving changes locally.Screenshots or screencast
I confirmed that React Fast Refresh still works with the updated
webpack-cliand other dependencies: