rollup-plugin-binary2base64

1.0.3 • Public • Published

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

Package Sidebar

Install

npm i rollup-plugin-binary2base64

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

3.35 kB

Total Files

5

Last publish

Collaborators

  • czizzy