Skip to content

Dynamic import of unified dependencies#1026

Merged
matthewlipski merged 3 commits into
mainfrom
fix-esm-unified-loading
Aug 28, 2024
Merged

Dynamic import of unified dependencies#1026
matthewlipski merged 3 commits into
mainfrom
fix-esm-unified-loading

Conversation

@YousefED
Copy link
Copy Markdown
Collaborator

@YousefED YousefED commented Aug 22, 2024

make unified imports dynamic to support loading from non esm projects

closes #1008

@vercel
Copy link
Copy Markdown

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
Copy Markdown
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
@nperez0111 nperez0111 deleted the fix-esm-unified-loading branch October 21, 2025 07:36
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