Deprecated: Function seems_utf8 is deprecated since version 6.9.0! Use wp_is_valid_utf8() instead. in /home/dplugins-code/htdocs/code.dplugins.com/wp-includes/functions.php on line 6131

Deprecated: Function seems_utf8 is deprecated since version 6.9.0! Use wp_is_valid_utf8() instead. in /home/dplugins-code/htdocs/code.dplugins.com/wp-includes/functions.php on line 6131
Gutenberg Blocks Development – Live Reload – Code DPlugins

Gutenberg Blocks Development – Live Reload

As I never menaged to set up WordPress/Scripts –hot I prefer to use Browser Sync

Install NPM

After instaling NPX Create block run:

  npm install browser-sync npm-run-all --save-dev

Then in the package.json update scripts section

  "scripts": {
    "preview": "npm-run-all --parallel sync start",
    "sync": "browser-sync start -p 'dev-wordpress.local' --files '**/*.php' 'build/*.js' 'build/*.css'",
    "build": "wp-scripts build",
    "packages-update": "wp-scripts packages-update",
    "plugin-zip": "wp-scripts plugin-zip",
    "start": "wp-scripts start"
  },

Replace ‘dev-wordpress.local’ with your local websute URL

Click to Copy