Breaking down Go.js diagram creation into multiple JS files

I am writing a demo application that uses go.js. But referring to the examples i see that only single page diagrams mostly developed under the script tag. I want to break the complete diagram generation process into multiple files in JS, inter linked with each other and able to reuse, functions from one to another files, but current i am facing issues in doing so.

How do you suggest i should proceed, in order to achieve this kind of modularity.

Addon : How do i use go.js on vue.js framework?

How you organize your web app and the JavaScript code that you use is entirely under your control. Our samples are intentionally as simple as they can be, for learning purposes, so with a few exceptions we have made each app literally a single-page app by including everything in the HTML page itself. (I’m not counting the goSamples.js file, which is only used to support the samples framework on our web site and is not meant to be used in any customer app.)

Most of the exceptions to everything being on a single page are in the projects subdirectory. And the BPMN sample was our first multi-file sample, before we created the projects subdirectory.

We aren’t particularly familiar with Vue.js. I assume you have already found Minimal GoJS Sample in Vue.js.