Registry / http-networking / binary-loader

binary-loader

JSON →
library0.0.1jsnpmunverified

A webpack loader that returns a file's content as a binary string. Adapted from raw-loader. Version 0.0.1, no recent updates. Key differentiators: allows importing binary files as strings without base64 encoding. No active maintenance, use raw-loader or file-loader with encoding options instead.

npm install binary-loader
INSTALL
IMPORT
SIG · BINARY-LOADER
B
binary-loader
http-networkingjavascriptv0.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
require('binary!./file.bin')
import content from 'binary!./file.bin'
Webpack loaders use require syntax; ESM import may work depending on webpack version but not officially supported.
loader function
module.exports = function(content) {}
export default function(content) {}
Loaders are CommonJS modules; ESM export is not supported.

Shows how to configure webpack to use binary-loader for .bin files and import them as binary strings.

// webpack.config.js module.exports = { module: { rules: [ { test: /\.bin$/, use: 'binary-loader' } ] } }; // app.js var binaryData = require('./file.bin'); console.log(binaryData); // binary string of file content
Debug
Known issues
deprecatedThis package is no longer maintained and has limited functionality.
fix
Use raw-loader or file-loader instead.
affects: >=0.0.0
breakingWorks only with legacy webpack 1/2; incompatible with webpack 4+ without additional configuration.
fix
Use webpack 4+ compatible alternatives.
affects: >=0.0.0
gotchaOutput is a binary string (not Buffer or ArrayBuffer), which may cause issues with binary data handling.
fix
Consider using raw-loader or file-loader for proper binary handling.
affects: >=0.0.0
Errors
Common errors & fixes
Module not found: Error: Can't resolve 'binary-loader' in /path
Missing npm install or local path issue.
fix
Run 'npm install binary-loader' and ensure it's in node_modules.
Module build failed: loader 'binary' not found
Loader name typo.
fix
Use 'binary-loader' or 'binary!./file.bin' (with exclamation) in require.
Upgrade
Version history
0.0.1latest on npm
Audit
Dependencies
webpackrequiredpeer dependency, loader designed for webpack
Agent activity
12 hits · last 30 days
node
10
Amazon
1
OpenAI (training)
1
Resources
binary-loader — npm install binary-loader · libregistry