Skip to content

Add relevant export for cjs with yoga-layout compatibility #694

@RuBAN-GT

Description

@RuBAN-GT

Feature Request

Description

Hey!
The latest satori version uses yoga-layout under the hood which works only in ESM mode therefore is a bit difficult to use Satori from Common.JS environment like Nest.js:

    import loadYogaImpl from '../binaries/yoga-wasm-base64-esm.js';
    ^^^^^^

    SyntaxError: Cannot use import statement outside a module

It will be nice to figure out and find any solution providing more soft satori integration via cjs.

Additional Context

As a temporary solution I recompiled satori by tsup: https://github.com/RuBAN-GT/satori-multi. May be it will be useful for everyone unless we found any other idea.

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