Code Monkey home page Code Monkey logo

webpack-sha-hash's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

webpack-sha-hash's Issues

Specify version of sha.js

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 :)

Webpack 4 Support? DeprecationWarning: Tapable.plugin & Chunk.mapModules

Question

Is this plugin intend to support Webpack 4?

What is the current behavior?

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)

What is the expected behaviour?

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.

Dependencies/Tool Lineup

"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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.