uint8array-loader
v1.0.2
Published
babel loader to return content as a unit8array
Downloads
4,073
Maintainers
Readme
unit8array-loader
babel loader to return content as a unit8array
npm install --save-dev uint8array-loader
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';