base64 file loader for webpack Installation npm install base64-loader Usage var fileContent = require("base64!./file.txt"); // => returns file.txt content as base64 string Documentation: Using loaders License MIT (http://www.opensource.org/licenses/mit-license.php)