Skip to content

Sherryer/binary-code-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Name Type Default Description
limit Boolean, Number, String true Specifying the maximum size of a file in bytes.

About

transform file to Uint8Array.buffer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published