-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
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 |
@@ -16,7 +16,7 @@ notMinified(); | |||
exports[`ReadableJsAssetsWebpackPlugin should produce the expected output: Asset file index.min.js should match snapshot 1`] = `"console.log("hello");"`; | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, I though arrow support was good enough :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might be a reason why webpack wraps code with a regular function now 🤷🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
webpack
updated to the latest versionbrowserslist
andcaniuse-lite
updated to the latest versionreact-refresh
updated to the latest versionIn addition, it tries to fix #53552 caused by the outdated version of
webpack-cli
:Why?
How?
It brings
webpack-cli
to the latest version. There were some breaking changes in v5.0.0, but they don't seem to have impact like:--hot
option in favor of directly using theHotModuleReplacement
plugin (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
webpack
in the repository with #49075, so here we follow-up with another version bump that also gets applied to@wordpress/scripts
.Testing Instructions
nvm use
to switch to the currently supported Node.js and npm versions.npm install
to install the latest version of dependencies.npm run build
and confirm the the build finishes correctly.npx wp-create-block example-static --no-wp-scripts
to confirm that Create Block still works.cd example-statice
to enter the newly created project.../node_modules/.bin/wp-scripts start --hot
to confirm that you can develop blocks with the dev server.edit
function. 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-cli
and other dependencies: