A webpack loader that returns the content of a file as a Node.js Buffer. This package is at version 0.1.0, compatible with Node >=5.10 and webpack. It is adapted from binary-loader and provides a simple way to import binary files as Buffer objects in webpack bundles. It does not appear to have been updated since its initial release, and it is not widely used. Alternative loaders like raw-loader or file-loader may be more modern and maintained. It only works with CommonJS imports and is not compatible with ESM.
npm install buffer-loaderVerified import paths — ran on the pinned version, not inferred.
Configures webpack to use buffer-loader for .bin files, then imports a binary file as a Buffer.
Use const content = require('buffer-loader!./file.bin'); instead of import.Consider using raw-loader for newer webpack versions: { test: /\.bin$/, use: 'raw-loader' }.Run npm install buffer-loader --save-dev
No dependency data recorded yet.