melonjs / melonJS

a fresh, modern & lightweight HTML5 game engine
https://melonjs.org
MIT License
5.92k stars 643 forks source link

Melon.js, TypeScript and Parcel #1111

Closed 8Observer8 closed 2 years ago

8Observer8 commented 2 years ago
"scripts": {
    "start": "parcel src/index.html --dist-dir public --open",
    "build": "parcel build src/index.html"
  },
  "dependencies": {
    "melonjs": "^10.12.0"
  }
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script  type="module" src="main.ts"></script>
</body>

</html>
import * as me from "melonjs";

console.log(me.version);

image

obiot commented 2 years ago

interesting, that line 28787 points to here: https://github.com/melonjs/melonJS/blob/master/src/system/device.js#L421 looks like an additional test on process.release should be added.

is it something you can test on your side (modify melonJS) ? else I can publish a new release

obiot commented 2 years ago

I updated the dist builds that includes the bug fix : https://raw.githubusercontent.com/melonjs/melonJS/master/dist/melonjs.module.js

there are a couple of others - no fully tested - changes in this wip release, but I don't think that should be a problem.

let me know if it works, then if yes I will finalised testing in // and then release this version.

thanks for the report !

8Observer8 commented 2 years ago

Yes, it works: https://github.com/melonjs/melonJS/commit/fcadbec8833c62ea248ade099db355d187ecc3a6

obiot commented 2 years ago

awesome, thanks for the feedback !

obiot commented 2 years ago

version 11.0 published on NPM, closing this ticket, thanks again for reporting the issue :)