-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add default text loader support for .md files #24478
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
base: main
Are you sure you want to change the base?
Add default text loader support for .md files #24478
Conversation
This change allows markdown files to be imported as text without requiring [loader] ".md" = "text" configuration in bunfig.toml. This is particularly useful for projects storing LLM prompts in markdown files. Changes: - Added .md extension to default_loaders_posix mapped to text loader - Added .md to default_loader_ext and node_modules_default_loader_ext arrays - Updated documentation in docs/bundler/loaders.mdx and docs/runtime/file-types.mdx - Added comprehensive test suite in test/js/bun/util/text-loader-markdown.test.ts Fixes oven-sh#24445
WalkthroughThis PR adds built-in support for loading Markdown files (.md) as text by default. Changes include updating documentation to reflect the new file type, implementing the loader mapping across three configuration sections, and adding tests for static imports, dynamic imports, and monorepo scenarios. Changes
Possibly related PRs
Pre-merge checks✅ Passed checks (4 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (6)test/**📄 CodeRabbit inference engine (.cursor/rules/writing-tests.mdc)
Files:
test/js/**/*.{js,ts}📄 CodeRabbit inference engine (.cursor/rules/writing-tests.mdc)
Files:
test/js/bun/**/*.{js,ts}📄 CodeRabbit inference engine (.cursor/rules/writing-tests.mdc)
Files:
test/**/*.{js,ts}📄 CodeRabbit inference engine (.cursor/rules/writing-tests.mdc)
Files:
**/*.zig📄 CodeRabbit inference engine (.cursor/rules/javascriptcore-class.mdc)
Files:
src/**/*.zig📄 CodeRabbit inference engine (.cursor/rules/building-bun.mdc)
Files:
🧠 Learnings (18)📚 Learning: 2025-10-19T02:44:46.354ZApplied to files:
📚 Learning: 2025-08-30T00:12:56.803ZApplied to files:
📚 Learning: 2025-08-30T00:12:56.803ZApplied to files:
📚 Learning: 2025-08-30T00:09:39.100ZApplied to files:
📚 Learning: 2025-08-30T00:09:39.100ZApplied to files:
📚 Learning: 2025-08-30T00:09:39.100ZApplied to files:
📚 Learning: 2025-08-30T00:09:39.100ZApplied to files:
📚 Learning: 2025-08-30T00:09:39.100ZApplied to files:
📚 Learning: 2025-08-30T00:12:56.803ZApplied to files:
📚 Learning: 2025-08-30T00:09:39.100ZApplied to files:
📚 Learning: 2025-10-26T01:32:04.844ZApplied to files:
📚 Learning: 2025-09-20T03:39:41.770ZApplied to files:
📚 Learning: 2025-10-13T06:54:58.043ZApplied to files:
📚 Learning: 2025-10-13T06:54:58.043ZApplied to files:
📚 Learning: 2025-10-19T02:52:37.412ZApplied to files:
📚 Learning: 2025-10-04T09:52:49.414ZApplied to files:
📚 Learning: 2025-10-01T22:13:08.081ZApplied to files:
📚 Learning: 2025-10-04T09:52:49.414ZApplied to files:
🧬 Code graph analysis (1)test/js/bun/util/text-loader-markdown.test.ts (1)
🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@Jarred-Sumner can you please have look? 👀 |
Fixes #24445
What does this PR do?
This change allows markdown files to be imported as text without requiring [loader] ".md" = "text" configuration in bunfig.toml. This is particularly useful for projects storing LLM prompts in markdown files.
Changes:
How did you verify your code works?
Before the fix (Using System Bun)
After the fix (Debug Build)