Was it something like this you had in mind? Or som...
# package-development
d
Was it something like this you had in mind? Or something more clever with regards to loading the Vite script? With the below it doesn't execute the remote script until later
Copy code
js
const myTestModule = 'myTestModule';

angular.module(myTestModule, []).config(function() {
  console.log("loader started");
  
  let script = document.createElement("script");
  script.type = "module";
  script.src = "/backoffice/src/main.ts";
  document.getElementsByTagName('head')[0].appendChild(script);
  
  console.log("loader finished");
});

angular.module('umbraco').requires.push(myTestModule);