dsebastien / webpack-sha-hash Goto Github PK
View Code? Open in Web Editor NEWPlugin to replace webpack's default chunkhash hashes by SHA hashes
License: MIT License
Plugin to replace webpack's default chunkhash hashes by SHA hashes
License: MIT License
Sha.js project was updated to 2.4.7, which added new dependency hash-base that throw error
51% 448/648 build modules D:\TeamCity.agents\buildAgent4\work\f2ba92264f7337d\node_modules\hash-base\index.js:42
if (this._finalized) throw new Error('Digest already called')
^
Error: Digest already called
at SHA512.HashBase.update (D:\TeamCity.agents\buildAgent4\work\f2ba92264f7337d\node_modules\hash-base\index.js:42:30
) at Compilation.<anonymous> (D:\TeamCity.agents\buildAgent4\work\f2ba92264f7337d\node_modules\webpack-sha-hash\dist\w
ebpack_sha_hash.js:69:63) at Compilation.applyPlugins (D:\TeamCity.agents\buildAgent4\work\f2ba92264f7337d\node_modules\tapable\lib\Tapable.js
:26:37) at Compilation.createHash (D:\TeamCity.agents\buildAgent4\work\f2ba92264f7337d\node_modules\webpack\lib\Compilation.
js:791:8) at Compilation.<anonymous> (D:\TeamCity.agents\buildAgent4\work\f2ba92264f7337d\node_modules\webpack\lib\Compilation
.js:554:8) at Compilation.applyPluginsAsync (D:\TeamCity.agents\buildAgent4\work\f2ba92264f7337d\node_modules\tapable\lib\Tapab
le.js:60:69) at Compilation.seal (D:\TeamCity.agents\buildAgent4\work\f2ba92264f7337d\node_modules\webpack\lib\Compilation.js:525:7) at Compiler.<anonymous> (D:\TeamCity.agents\buildAgent4\work\f2ba92264f7337d\node_modules\webpack\lib\Compiler.js:39
7:15) at D:\TeamCity.agents\buildAgent4\work\f2ba92264f7337d\node_modules\tapable\lib\Tapable.js:103:11 at Compilation.<anonymous> (D:\TeamCity.agents\buildAgent4\work\f2ba92264f7337d\node_modules\webpack\lib\Compilation
.js:445:10)
sha.js 2.4.5 work's great
Can you specify version? Thx :)
Is this plugin intend to support Webpack 4?
When upgrading to webpack 4 and with the node tracing turned on (process.traceDeprecation = true;
in webpack.config.js
), by running the webpack-dev-server --mode development
, the following DeprecationWarning
with stack trace is shown.
(node:32184) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
at WebpackSHAHash.apply (C:\app\node_modules\webpack-sha-hash\dist\webpack_sha_hash.js:85:22)
at webpack (C:\app\node_modules\webpack\lib\webpack.js:37:12)
at options.map.options (C:\app\node_modules\webpack\lib\webpack.js:28:55)
at Array.map (<anonymous>)
at webpack (C:\app\node_modules\webpack\lib\webpack.js:28:40)
at startDevServer (C:\app\node_modules\webpack-dev-server\bin\webpack-dev-server.js:379:16)
at portfinder.getPort (C:\app\node_modules\webpack-dev-server\bin\webpack-dev-server.js:369:5)
at C:\app\node_modules\portfinder\lib\portfinder.js:160:14
at C:\app\node_modules\async\lib\async.js:52:16
at C:\app\node_modules\async\lib\async.js:269:32
(node:32184) DeprecationWarning: Chunk.mapModules: Use Array.from(chunk.modulesIterable, fn) instead
at C:\app\node_modules\webpack-sha-hash\dist\webpack_sha_hash.js:87:65
at SyncHook.eval [as call] (eval at create (C:\app\node_modules\tapable\lib\HookCodeFactory.js:17:12), <anonymous>:7:1)
at SyncHook.lazyCompileHook [as _call] (C:\app\node_modules\tapable\lib\Hook.js:35:21)
at Compilation.createHash (C:\app\node_modules\webpack\lib\Compilation.js:1705:25)
at hooks.optimizeTree.callAsync.err (C:\app\node_modules\webpack\lib\Compilation.js:933:9)
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\app\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (C:\app\node_modules\tapable\lib\Hook.js:35:21)
at Compilation.seal (C:\app\node_modules\webpack\lib\Compilation.js:890:27)
at hooks.make.callAsync.err (C:\app\node_modules\webpack\lib\Compiler.js:481:17)
at _err0 (eval at create (C:\app\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:11:1)
Since this is a deprecation warning, if the plug-in is not intended to be used with Webpack 4, they can be ignored. On the other hand, on webpack's documentation, output.hashFunction property seems configurable and perhaps using it to define a alternative hash function without using webpack-sha-hash
plugin would the official way to go with Webpack 4? It would be grateful if some clarity can be provided in the readme regards to Webpack 4 support and the expected deprecation warnings.
"webpack": "4.6.0",
"webpack-cli": "2.0.15",
"webpack-dev-server": "3.1.3",
"webpack-sha-hash": "2.0.0",
Node v8.9.1
Windows 10
Please refer this for detail
https://github.com/dsebastien/webpack-sha-hash/compare/master...kovenliao:fix?expand=1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.