babel-plugin-transform-assets-import-to-string

JSON →
library 2.0.0 ·javascript
verified May 27, 2026

Babel plugin that transforms asset imports and requires (e.g., images, SVGs) into CDN URL strings with content-based hashing. Version 2.0.0 is the current stable release, requiring Node.js 20+ and @babel/core ^7.20.0. It supports both ESM import and CommonJS require, configurable file extensions, hash length, output directory for copying assets, and path preservation. Differentiators include isomorphic/SSR focus, TypeScript typings, and simple setup without a module bundler. Release cadence is low; the plugin has had only a few updates since its initial 1.0.0 release.

total hits 17
actors 6 distinct systems
last hit 2d ago AhrefsBot
ByteDance
3
GPTBot
2
Script
1
Search engines
1
Humans
2

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