Well, it's currently 12:05 AM, I really shouldn't be up this late, but I can't help it. When there's a problem, it's gotta be fixed. I converted my js files to typescript, I can see the benefit of using typescript now.
When export and importing modules, there's two different ways. a regular export, and a default export.
When importing a module's default export, I'm allowed to call it whatever I want. However, if importing any other export, it must be the same name. Gotta keep that in mind.
Also, I need to make sure im not calling any functions in my modules. Whenever I import a module, it'll call any functions that the module itself calls. That was a headache.
My goodness, I can't stand working with links. They might need to be relative, they might need to be absolute, I might need to accomodate for the site url, ugh. It's frustrating. Actually, it wouldn't be so bad, if I wasn't having to work in eleventy's url prefix. Since i'm using github pages, I need to be able to include the prefix on my site. Learned a couple neat things along the way.
First of all, I can set a global variable in eleventy's config - eleventyConfig.addGlobalData("ELEVENTY_BASE", prefix);
This let me pass along the prefix into my html file (and potentially, any other data I could ever want) <script> window.ELEVENTY_BASE = "{ ELEVENTY_BASE | safe }"; <script>
You can then actually pass this sata to a global variable in the html file with window.VARIABLE name, which can me picked up in my main.js file. So now we have a good flow going. eleventy --> html --> js