Babel plugin that enables importing files as base64-encoded Data URIs. Version 1.0.1 (released ~2018) is the latest stable version, with no frequent releases. It hooks into Babel's transform step to replace import statements for supported extensions (default: .svg, .png) with the file content as a data URI string. Differentiators vs alternatives (e.g., Webpack's url-loader, babel-plugin-inline-import): it focuses purely on Babel transforms without bundler dependency, and outputs only Data URIs (not raw text or base64 blobs). Requires Babel 6+ and Node.js. Limited to small files due to inlining.
npm install babel-plugin-inline-import-data-uriVerified import paths — ran on the pinned version, not inferred.
Configures Babel to inline .svg and .png imports as base64 Data URIs.
Use import default syntax: import variable from './file.svg'.
Keep files small or use a bundler loader (e.g., Webpack file-loader) for larger assets.
Use static import syntax only.
Check compatibility with Babel 7+ or consider alternatives like babel-plugin-inline-import or Webpack loaders.
Use CommonJS config file (.babelrc.js or babel.config.js) or dynamic import in .mjs config.
Run 'npm install --save-dev babel-plugin-inline-import-data-uri' and use 'inline-import-data-uri' in plugins array.
Ensure you use Babel 6 compatible version (1.0.1) or upgrade plugin.
No dependency data recorded yet.