Skip to content

Dynamic import of unified dependencies #1026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 28, 2024
Merged

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
6 checks passed
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