Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

recast-detour WASM does not work well in ESM #781

Copy link
Copy link
@ylacaute

Description

@ylacaute
Issue body actions

Original post on babylonjs forum: https://forum.babylonjs.com/t/using-recastjs-on-nodejs-or-browser-in-esm-or-cjs/58709

To work in any context (ESM or CJS) we have to replace

this["Recast"] = Module;

with

globalThis["Recast"]

In recast.js and recast.es6.js

I think this is a breaking change but only for very old browsers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.