uint8array-loader

v1.0.2
babel loader to return content as a unit8array
unit8 unit8array binary binary file babel babel-loader flatbuffers

unit8array-loader

Downloads Downloads NPM Version Dependencies Dev Dependencies License

babel loader to return content as a unit8array

Install

npm install --save-dev uint8array-loader

Usage

Use the loader either via your webpack config, CLI or inline.

Via webpack config (recommended)

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.bfbs$/,
        use: 'unit8array-loader'
      }
    ]
  }
}

In your application

import txt from 'file.bfbs';

CLI

webpack --module-bind 'bfbs=uint8array-loader'

In your application

import txt from 'file.bfbs';

Inline

In your application

import txt from 'unit8array-loader!./file.bfbs';
npm i uint8array-loader

Metadata

  • MIT
  • Whatever
  • Jonathan Gertig
  • released 7/3/2017

Downloads

Maintainers