Skip to content

ESM Support for Shiki (usage in Framer) #357

@benjamindenboer

Description

@benjamindenboer

Hello! I’d love to support Shiki within Framer, as part of a component such as https://syntax.page/

Unfortunately, it appears Shiki isn’t ESM-compatible. In Framer, I can pull in NPM packages to create custom React components with, but only if they are ESM-compatible. https://www.framer.com/npm/

This is what it errors on:

image

T10:04:20.356Z warn: [modules-runtime] Error in 'codeFile/Shiki.tsx': SyntaxError: The requested module 'https://ga.jspm.io/npm:[email protected]/release/main.js' does not provide an export named 'createOnigScanner' (anonymous) @ instrument.js:91 instrument.js:91

Would appreciate any guidance or tips.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions