Build: Enable React Fast Refresh for block development

Brings the same functionality introduced in the Gutenberg plugin with https://github.com/WordPress/gutenberg/pull/28273. In effect, it brings React Fast Refresh support to WordPress core for block development with `@wordpress/scripts`.

Props walbo, antonvlasenko.
See #51750, #55505.
Follow-up [53135].



git-svn-id: https://develop.svn.wordpress.org/trunk@53140 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Greg Ziółkowski
2022-04-11 16:08:12 +00:00
parent 39775c1111
commit b726922bb9
7 changed files with 108 additions and 1 deletions
+2
View File
@@ -24,6 +24,7 @@
"last 2 Opera versions"
],
"devDependencies": {
"@pmmmwh/react-refresh-webpack-plugin": "0.5.5",
"@wordpress/babel-preset-default": "6.8.0",
"@wordpress/dependency-extraction-webpack-plugin": "3.4.1",
"@wordpress/e2e-test-utils": "5.4.10",
@@ -62,6 +63,7 @@
"matchdep": "~2.0.0",
"prettier": "npm:wp-prettier@2.0.5",
"qunit": "~2.18.1",
"react-refresh": "0.10.0",
"sass": "^1.50.0",
"sinon": "~13.0.1",
"sinon-test": "~3.1.3",