Registry / devops / babel-plugin-add-filehash

babel-plugin-add-filehash

JSON →
library7.6.0jsnpmunverified

A Babel plugin that forces output to change whenever the input file changes, even for trivial/whitespace changes. Version 7.6.0 is current, but the primary use case (forcing Webpack to show updated eslint messages on unchanged files) has been obsolete since Webpack v3.5.4 fixed the underlying issue. The plugin remains functional for anyone needing deterministic output changes, but it is effectively a legacy tool. It has no dependencies beyond Babel itself and is a zero-config plugin.

npm install babel-plugin-add-filehash
INSTALL
IMPORT
SIG · BABEL-PLUGIN-ADD-F
B
babel-plugin-add-filehash
devopsjavascriptv7.6.0
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.

plugin (default)
module.exports = { plugins: ['add-filehash'] }
import addFilehash from 'babel-plugin-add-filehash'
This is a Babel plugin, not imported directly in user code. Used via .babelrc or babel.config.js as a string reference.

Shows how to enable the plugin in Babel configuration.

// .babelrc or babel.config.js { "plugins": [ ["add-filehash", { // Optional: specify which comment to add hash to // Default: adds hash as file comment }] ] }
Debug
Known issues
deprecatedPlugin is unnecessary for modern Webpack (>=3.5.4). Original use case fixed.
fix
Remove plugin from configuration if using Webpack v3.5.4+.
affects: >=7.0.0
Errors
Common errors & fixes
Error: [BABEL] unknown: The filehash plugin hasn't generated any changes. (While processing: /path/to/file.js)
Plugin may not add hash if file already contains output hash or if configuration conflicts.
fix
Verify plugin is correctly listed in plugins array. Check for other plugins that may suppress output.
Upgrade
Version history
7.6.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
babel-plugin-add-filehash — npm install babel-plugin-add-filehash · libregistry