Skip to content

Conversation

YousefED
Copy link
Collaborator

@YousefED YousefED commented Aug 22, 2024

make unified imports dynamic to support loading from non esm projects

closes #1008

Copy link

vercel bot commented Aug 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Aug 23, 2024 5:06pm
blocknote-website ✅ Ready (Inspect) Visit Preview Aug 23, 2024 5:06pm

@YousefED YousefED changed the title wip: dynamic import of unified dependencies Dynamic import of unified dependencies Aug 23, 2024
Copy link
Collaborator

@matthewlipski matthewlipski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good👍 This is pretty much the same thing we do as with the emojis for the emoji picker right? i.e.

// load dynamically because emoji-mart doesn't specify type: module and breaks in nodejs
emojiMart = await import("emoji-mart");

But with multiple modules instead of just 1

@matthewlipski matthewlipski merged commit 2ef1925 into main Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error [ERR_REQUIRE_ESM]: require() of ES Module

2 participants