Skip to content

Config: Use dynamic import for tinyglobby#1591

Merged
marcoroth merged 1 commit intomainfrom
dynamic-tinyglobby-import
Apr 3, 2026
Merged

Config: Use dynamic import for tinyglobby#1591
marcoroth merged 1 commit intomainfrom
dynamic-tinyglobby-import

Conversation

@marcoroth
Copy link
Copy Markdown
Owner

@marcoroth marcoroth commented Apr 3, 2026

The tinyglobby npm modules depends on fdir which uses createRequire from Node.js's module package.

The top-level import caused a createRequire is not a function error when the playground (or any browser consumer) imported @herb-tools/linter, which transitively imports @herb-tools/config.

Since glob is only used in findFilesForTool (a Node.js-only code path), a dynamic import avoids pulling fdir into browser bundles entirely.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

🌿 Interactive Playground and Documentation Preview

A preview deployment has been built for this pull request. Try out the changes live in the interactive playground:


🌱 Grown from commit 125b12f


✅ Preview deployment has been cleaned up.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 3, 2026

npx https://pkg.pr.new/@herb-tools/formatter@1591
npx https://pkg.pr.new/@herb-tools/language-server@1591
npx https://pkg.pr.new/@herb-tools/linter@1591

commit: 125b12f

@marcoroth marcoroth merged commit a997e6c into main Apr 3, 2026
26 of 27 checks passed
@marcoroth marcoroth deleted the dynamic-tinyglobby-import branch April 3, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant