Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

unit8array-loader

jcgertig12MITdeprecated1.0.1

renamed package to correct spelling uint8array-loader please switch to that

return content as uint8array

unit8, unit8array, binary, binary file, babel, babel-loader, flatbuffers

readme

Downloads Downloads NPM Version Dependencies Dev Dependencies License

Install

npm install --save-dev uint8array-loader

Usage

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

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';