1.0.3 • Published 4 years ago

rollup-plugin-binary2base64 v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

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