I have followed the instructions for internationalization on: https://developer.wordpress.org/block-editor/developers/internationalization/, but it doesn't seem to play well with the development tools for Gutenberg. It will find all the translations in the src directory in the multiple js files and will use that as the relative paths while the npm run build will make one build/index.js file which I am enqueueing. The wp i18n make-json languages --no-purge will create multiple files which the MD5 won't work (probably because of the relative paths) and I can't name them al ${domain}-${local}-${handler}.json.
To have a better understanding what I mean. I now have the following:
npm init
npm i --save-dev --save-exact @wordpress/scripts
mkdir build
mkdir src
cd src
touch index.js
touch edit.js
index.js
import { __ } from '@wordpress/i18n';
import { registerBlockType } from '@wordpress/blocks';
import edit from './edit.js';
registerBlockType( 'gbg/myguten', {
title: __( "My Gutenberg Example", "gbg" ),
category: "widgets",
edit
} );
edit.js
import { __ } from '@wordpress/i18n';
export default () => (<h1>{ __( "Hello World", "gbg" ) }</h1>);
I then generate the translations:
mkdir lang
wp i18n make-pot ./ lang/myguten.pot
cp myguten.pot myguten-en_US.po
wp i18n make-json myguten-en_US.po --no-purge
This will generate multiple json files, while I rather have one combined json file. npm run build will generate one index.js file which I use to register in WordPress.
/**
* Plugin Name: My Guten
* Text Domain: gbg
*/
function gbg_myguten_block_init() {
load_plugin_textdomain( 'gbg', false, dirname( plugin_basename(__FILE__) ) . '/lang/' );
wp_register_script(
'gbg-myguten-script',
plugins_url( 'build/index.js', __FILE__ ),
array( 'wp-blocks', 'wp-element', 'wp-i18n' ),
time(),
true
);
register_block_type(
'gbg/myguten',
array(
'editor_script' => 'gbg-myguten-script',
)
);
wp_set_script_translations( 'gbg-myguten-script', 'gbg', plugin_dir_path( __FILE__ ) . 'lang' );
}
add_action( 'init', 'gbg_myguten_block_init' );
Now it will search for ${domain}-${locale}-${handle}.json while multiple json files exist.

${domain}-${locale}-${handle}.jsonis indeed loaded before the individual JSON/translation files, but there's a good reason whymake-jsongenerates those files as explained here. Nevertheless, you can try po2json. :)