WordPress Gutenberg Custom Block the viewScript does not get loaded on the frontend when my block is inserted

I’ve created a new custom Gutenberg block using the following package: @wordpress/create-block. This bootstrapped a complete plugin for me where I only needed to edit files in order to get things working.

All of the editor code is working. It is a hero/visual block where a user can select images and a title for the slide. It’s also correctly rendering on the frontend with all the images + titles.

The next thing to do is create the javascript in order for the carousel functionality to work, however, my viewScript (set to "file:./view.js" is not being loaded on the frontend. With loaded, I mean it’s not in the HTML and not in the network tab.

This is my block.json inside of my build folder:

  "$schema": "https://schemas.wp.org/trunk/block.json",
  "apiVersion": 3,
  "name": "custom-block/hero",
  "version": "0.1.0",
  "title": "Hero",
  "category": "widgets",
  "icon": "smiley",
  "description": "Custom hero block",
  "attributes": {
    "images": {
      "type": "array",
      "source": "query",
      "default": [],
      "selector": "img",
      "query": {
        "url": {
          "type": "string",
          "source": "attribute",
          "attribute": "src"
        },
        "alt": {
          "type": "string",
          "source": "attribute",
          "attribute": "alt"
        },
        "caption": {
          "type": "string",
          "source": "attribute",
          "attribute": "data-caption"
        }
      }
    }
  },
  "supports": {
    "html": false
  },
  "textdomain": "hero",
  "editorScript": "file:./index.js",
  "editorStyle": "file:./index.css",
  "style": "file:./style-index.css",
  "viewScript": "file:./view.js",
  "viewStyle": "file:./view.css"
}

As you can see, I’ve set my viewScript to load a file called view.js. This is also present in the build folder of my plugin, as you can see right here in the actual repository

My entrypoint for the plugin, called hero.php, does not make use of the render_callback function, so I should not have to manually enqueue this script. It looks as follows:

/**
 * Plugin Name:       Hero
 * Description:       Custom hero block.
 * Requires at least: 6.1
 * Requires PHP:      7.0
 * Version:           0.1.0
 * Author:            Daniel
 * License:           GPL-2.0-or-later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:       hero
 *
 * @package CreateBlock
 */

if ( ! defined( 'ABSPATH' ) ) {
  exit; // Exit if accessed directly.
}

function create_block_hero_block_init() {
  register_block_type( __DIR__ . '/build' );
}

add_action( 'init', 'create_block_hero_block_init' );

As I mentioned, when I insert the block, save the page and go to the frontend I’m expecting this view.js file to be loaded, but it’s nowhere to be found. I’ve searched everywhere online, but for everybody else it seems to be working. Am I missing a crucial step?

Thank you in advance.