Skip to content
PluginStats

babel-plugin-inline-import weekly downloads statistics

By Quadric · npm · Babel plugins

Babel plugin to make raw files importable

View on npm Fresh · Dec 6, 2026

babel-plugin-inline-import has 317,177 recorded weekly downloads on npm, a decrease of 3.1% over the past 30 days, ranking #458 of 3,247 tracked listings.

Weekly downloads
317,177
Official API · Dec 5, 2026
7-day growth
+10.3%
+29.6K weekly downloads
30-day growth
-3.1%
-10.2K weekly downloads
90-day growth
+57.9%
+116.3K weekly downloads
Rank
#458
▼ 2 in 7 days

About babel-plugin-inline-import

Babel Inline Import Build Status

Babel plugin to add the opportunity to use import with raw/literal content<br> It is good e.g. for importing *.graphql files into your code.

Examples

Before (without Babel-Inline-Import):

// server.js

// bad syntax highlighting, no syntax checking
const typeDefinitions = `
type Query {
  testString: String
}
schema {
  query: Query
}
`;

graphQLServer({
  schema: [typeDefinitions],
  ...
});

Now (with Babel-Inline-Import):

// /some/schema.graphql
type Query {
  testString: String
}
schema {
  query: Query
}
// server.js
import schema from '/some/schema.graphql';

graphQLServer({
  schema: [schema],
  ...
});

Note: both cases are equivalent and will result in similar code after Babel transpile them. Check How it works section for details.

Install

npm install babel-plugin-inline-import --save-dev

Use

Add a .babelrc file and write:

{
  "plugins": [
    "babel-plugin-inline-import"
  ]
}

or pass the plugin with the plugins-flag on CLI

babel-node myfile.js --plugins babel-plugin-inline-import

By default, Babel-Inline-Import is compatible with the following file extensions:

  • .raw
  • .text
  • .graphql

Customize

If you want to enable different file extensions, you can define them in your .babelrc file

{
  "plugins": [
    ["babel-plugin-inline-import", {
      "extensions": [
        ".json",
        ".sql"
      ]
    }]
  ]
}

How it works

It inserts the content of the imported file directly into the importing file, assigning it to a variable with the same identifier of the import statement, thus replacing the import statement and the file path by its resulting raw content (no parsing occurs).

Caveats

Babel does not track dependency between imported and importing files after the transformation is made. Therefore, you need to change the importing file in order to see your changes in the imported file spread. To overcome this:

Also make sure that your task runner is watching for changes in the imported file as well. You can see it working here.

Motivate

If you like this project just give it a star :) I like stars.

Description from the npm listing.

  • babel-plugin
  • graphql
  • raw
  • extension
  • wrap
  • import
  • inline

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

babel-plugin-inline-import weekly downloads on npm, last 90 days: 317,177 weekly downloads as of Dec 5, 2026, +57.9% over 90 days.babel-plugin-inline-importWeekly downloads on npm · Last 90 days317,177downloads / week+57.9% over 90 days050K100K150K200K250K300K350KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
babel-plugin-inline-import weekly downloads on npm, last 90 days: 317,177 weekly downloads as of Dec 5, 2026, +57.9% over 90 days.

7/30/90-day growth

babel-plugin-inline-import weekly downloads growth on npm: +10.3% over 7 days, -3.1% over 30 days, +57.9% over 90 days.babel-plugin-inline-importWeekly downloads growth on npm317,177downloads / week now7-day growth+29,641 weekly downloads+10.3%30-day growth-10,174 weekly downloads-3.1%90-day growth+116,318 weekly downloads+57.9%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
babel-plugin-inline-import weekly downloads growth on npm: +10.3% over 7 days, -3.1% over 30 days, +57.9% over 90 days.

Ranking history

babel-plugin-inline-import npm ranking history: currently #458 (by weekly downloads).babel-plugin-inline-importnpm ranking · by weekly downloads · Last 90 days#458current rank#430#435#440#445#450#455#460#465#470Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
babel-plugin-inline-import npm ranking history: currently #458 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 23, #18 (overall #458)
All npm: every listing in weekly downloads order

Listing placement

Babel plugins263 listings · 14 pages · page 11, #10 (overall #210)
Babel plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for babel-plugin-inline-import
Date (UTC)Weekly downloadsChange vs. previous
317,177+1.7K
315,463+10.5K
304,945+9.9K
295,049+3.8K
291,274+5K
286,316-856
287,172-364
287,536+481
287,055-2.3K
289,339-4.1K
293,421-37
293,458-555
294,013+3.2K
290,813—

Similar npm Babel plugins plugins

All 20 babel-plugin-inline-import alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/babel-plugin-inline-import. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.