babel-plugin-inline-import
JSON →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.
Traffic · last 30 days ↑13% vs prev 7d
total hits 29
actors 8 distinct systems
last hit 2d ago Amazonbot
top countries 🇺🇸 United States · 🇩🇪 Germany · VN · 🇸🇬 Singapore · 🇨🇦 Canada
Resources
API endpoints
compatibility /v1/registry/babel-plugin-inline-import/compatibility