Hello, I am attempting to import some typescript modules to a client-side script with define:vars set. This gives me Uncaught SyntaxError: Cannot use import statement outside a module, which makes sense, given define:vars forces the client side script to look like:
(function(){
const foo = 'bar';
const baz = 'etc';
import { something } from './somewhere';
// ...
})();```
My question is, how do I solve this? The modules in question are not JSON serialisable thus I cannot pass them through with define:vars, https://docs.astro.build/en/reference/directives-reference/#definevars