rollup-plugin-binary2base64
v1.0.3
Published
Converts binary files to base64 string modules
Downloads
7
Maintainers
Readme
rollup-plugin-binary2base64
Converts binary files to base64 string modules
import binaryBase64 from "./data.bin";
console.log(`data base64 string: ${binaryBase64}`);
Installation
npm i rollup-plugin-binary2base64 -D
Usage
import { rollup } from "rollup";
import { binary2base64 } from "rollup-plugin-binary2base64";
rollup({
entry: "main.js",
plugins: [
binary2base64({
// Required to be specified
include: ["**/*.wasm", "**/*.bin"]
// Undefined by default
exclude: ["**/exclude.bin"]
})
]
});
License
MIT © Izzy Chen