ondras / rot.js

ROguelike Toolkit in JavaScript. Cool dungeon-related stuff, interactive manual, documentation, tests!
https://ondras.github.io/rot.js/hp/
BSD 3-Clause "New" or "Revised" License
2.32k stars 254 forks source link

eventque.js in the lib folder does not successfully import MinHeap #188

Closed Jer1911 closed 3 years ago

Jer1911 commented 3 years ago

Hi,

First off I want to say thank you for making this amazing library. Now on to my issue: I notice that in /lib/eventque.js , you say:

import {MinHeap} from "./MinHeap";

Which in my case caused a 404 when testing locally. When I changed that line to this:

import { MinHeap } from "./MinHeap.js";

It now works as expected. Not sure if this was just a typo or if it was intended and I am just being dumb, so I thought I would mention it here. Again, thanks for your great work!

Best Regards, Jeremy

ondras commented 3 years ago

Nice find! The code is generated by tsc and it is apparently able to import both extension-less and .js files. I will fix this.

ondras commented 3 years ago

Hi @Jer1911,

it should be fixed now. Please let me know if you run into further issues.