babel-plugin-inline-import

JSON →
library 3.0.0 ·javascript
verified May 27, 2026

Babel plugin that allows importing raw file contents as strings during transpilation. Version 3.0.0 supports importing files with extensions like .raw, .text, .graphql, with configurable extension mapping. It replaces import statements with the file's literal content, enabling use cases like embedding GraphQL schemas or SQL queries without separate file reading. Differentiates from webpack raw-loader by operating at the Babel level, working with babel-node and babel-register. Caveat: Babel does not track dependencies for imported files, requiring cache disabling or watcher configuration.

total hits 29
actors 8 distinct systems
last hit 2d ago Amazonbot
Amazonbot
4
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
Search engines
1
Humans
6

top countries 🇺🇸 United States · 🇩🇪 Germany · VN · 🇸🇬 Singapore · 🇨🇦 Canada