1.0.1 • Published 2 years ago

binary-code-loader v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

binary-code-loader

build file to base64,transform base64 file to Uint8Array.buffer in runtime

install

npm install binary-code-loader --save-dev

usage

webpack.config.js

module.exports = {
  module: {
    rules: [
      {
        test: /\.wasm$/,
        use: [
          {
            loader: 'binary-code-loader',
            options: {
              limit: 8192,
            },
          },
        ],
      },
    ],
  },
};

Options

NameTypeDefaultDescription
limitBoolean, Number, StringtrueSpecifying the maximum size of a file in bytes.