Dist-custom-elements, single-export-module and globalScript

I am trying to use the below snippet of code to have a one single file exported (and try avoiding lazy loading). All seems to work as it should, but the code set to the globalScript key does not seem to be executed.
I am not able to understand if this is intended, a bag, or a mistake in my setup.
Has anyone faced the same problem? or any idea how to overtake this issue?
…and, more in general, is this approach a good one to avoid lazy loading?

  type: "dist-custom-elements",
  generateTypeDeclarations: true,
  includeGlobalScripts: true,
  customElementsExportBehavior: "single-export-module",
  minify: false,
  componentCorePackage: "@my-lib/stencil-library/dist/",
  proxiesFile: "../react-library/lib/components/stencil-generated/index.ts",
  includeImportCustomElements: true,
  includeDefineCustomElements: undefined,