So I have wasted like 6 hours on this.
I need to load a typescript file with a few dependancies into a vanilla js project.
This is what I do.
import {myFunction} from '/index.js'; //crashes site
import myFunction from '/index.js'; //crashes site
import * from '/index.js'; //symbol not found
import * as things from '/index.js';
//console.log(things) prints: Module {Symbol(Symbol.toStringTag): 'Module'} Symbol(Symbol.toStringTag): "Module"
import("./index.js").then(function (myFunction) {
console.log(myFunction);
});
//prints: Module {Symbol(Symbol.toStringTag): 'Module'} Symbol(Symbol.toStringTag): "Module"
I also have tried export default in the typescript with all the attempts above.
I appreciate any advice.