webpack / tapable

Just a little module for plugins.
MIT License
3.74k stars 396 forks source link

TypeScript Type Error: Type 'void' is not assignable to type '{ normalModuleFactory: NormalModuleFactory; }'. #116

Closed ryanelian closed 3 years ago

ryanelian commented 4 years ago

I am attempting to migrate my tool from Webpack 4 to Webpack 5,

this is my code:

            compiler.hooks.compilation.tap('typescript-minify-notify', compilation => {
                compilation.hooks.afterHash.tap('typescript-minify-notify', () => {
                    console.log("Minify finished!");
                });
            });

However, I received an compile / type error like this:

 error TS2345: Argument of type '(compilation: Compilation) => void' is not assignable to parameter of type '(args_0: Compilation) => { normalModuleFactory: NormalModuleFactory; }'.
  Type 'void' is not assignable to type '{ normalModuleFactory: NormalModuleFactory; }'.

Has the tapable API changed? For some reason the tap function expects the 2nd argument to be a function which returns an object:

image

sokra commented 4 years ago

try to upgrade your typescript version

ryanelian commented 4 years ago
info Direct dependencies
├─ @babel/core@7.7.7
├─ @types/autoprefixer@9.6.1
├─ @types/eslint@6.1.3
├─ @types/fs-extra@8.0.1
├─ @types/loader-utils@1.1.3
├─ @types/sass@1.16.0
├─ @types/webpack-dev-server@3.9.0
├─ @types/which@1.3.2
├─ @types/yargs@13.0.3
├─ @typescript-eslint/eslint-plugin@2.12.0
├─ @typescript-eslint/parser@2.12.0
├─ ajv@6.10.2
├─ autoprefixer@9.7.3
├─ ava@2.4.0
├─ babel-loader@8.0.6
├─ chalk@3.0.0
├─ chokidar@3.3.1
├─ clean-css@4.2.1
├─ css-loader@3.4.0
├─ dotenv@8.2.0
├─ eslint@6.8.0
├─ fast-glob@3.1.1
├─ fibers@4.0.2
├─ fs-extra@8.1.0
├─ html-loader@0.5.5
├─ html-minifier@4.0.0
├─ merge-source-map@1.1.0
├─ portfinder@1.0.25
├─ postcss@7.0.25
├─ sass@1.24.0
├─ say@0.16.0
├─ source-map@0.7.3
├─ typescript@3.7.4
├─ upath@1.2.0
├─ vue-loader@15.8.3
├─ vue-template-compiler@2.6.11
├─ webpack-dev-server@3.10.1
├─ webpack@5.0.0-beta.10
├─ worker-farm@1.7.0
└─ yargs@15.0.2
info All dependencies
├─ @ava/babel-plugin-throws-helper@4.0.0
├─ @ava/babel-preset-stage-4@4.0.0
├─ @ava/babel-preset-transform-test-files@6.0.0
├─ @babel/core@7.7.7
├─ @babel/generator@7.7.7
├─ @babel/helper-annotate-as-pure@7.7.4
├─ @babel/helper-create-regexp-features-plugin@7.7.4
├─ @babel/helper-get-function-arity@7.7.4
├─ @babel/helper-module-imports@7.7.4
├─ @babel/helper-module-transforms@7.7.5
├─ @babel/helper-regex@7.5.5
├─ @babel/helper-remap-async-to-generator@7.7.4
├─ @babel/helper-wrap-function@7.7.4
├─ @babel/helpers@7.7.4
├─ @babel/highlight@7.5.0
├─ @babel/parser@7.7.7
├─ @babel/plugin-proposal-async-generator-functions@7.7.4
├─ @babel/plugin-proposal-dynamic-import@7.7.4
├─ @babel/plugin-proposal-optional-catch-binding@7.7.4
├─ @babel/plugin-syntax-async-generators@7.7.4
├─ @babel/plugin-syntax-dynamic-import@7.7.4
├─ @babel/plugin-syntax-optional-catch-binding@7.7.4
├─ @babel/plugin-transform-dotall-regex@7.7.7
├─ @babel/plugin-transform-modules-commonjs@7.7.5
├─ @concordance/react@2.0.0
├─ @nodelib/fs.scandir@2.1.3
├─ @nodelib/fs.stat@2.0.3
├─ @nodelib/fs.walk@1.2.4
├─ @sindresorhus/is@0.14.0
├─ @szmarczak/http-timer@1.1.2
├─ @types/anymatch@1.3.1
├─ @types/autoprefixer@9.6.1
├─ @types/body-parser@1.17.1
├─ @types/browserslist@4.4.0
├─ @types/color-name@1.1.1
├─ @types/connect-history-api-fallback@1.3.3
├─ @types/eslint-visitor-keys@1.0.0
├─ @types/eslint@6.1.3
├─ @types/estree@0.0.40
├─ @types/events@3.0.0
├─ @types/express@4.17.2
├─ @types/fs-extra@8.0.1
├─ @types/http-proxy-middleware@0.19.3
├─ @types/http-proxy@1.17.2
├─ @types/json-schema@7.0.3
├─ @types/loader-utils@1.1.3
├─ @types/mime@2.0.1
├─ @types/minimatch@3.0.3
├─ @types/range-parser@1.2.3
├─ @types/sass@1.16.0
├─ @types/source-list-map@0.1.2
├─ @types/tapable@1.0.4
├─ @types/uglify-js@3.0.4
├─ @types/webpack-dev-server@3.9.0
├─ @types/webpack-sources@0.1.5
├─ @types/which@1.3.2
├─ @types/yargs-parser@13.1.0
├─ @types/yargs@13.0.3
├─ @typescript-eslint/eslint-plugin@2.12.0
├─ @typescript-eslint/parser@2.12.0
├─ @vue/component-compiler-utils@3.1.0
├─ @webassemblyjs/floating-point-hex-parser@1.8.5
├─ @webassemblyjs/helper-code-frame@1.8.5
├─ @webassemblyjs/helper-fsm@1.8.5
├─ @webassemblyjs/helper-wasm-section@1.8.5
├─ @webassemblyjs/wasm-edit@1.8.5
├─ @webassemblyjs/wasm-opt@1.8.5
├─ @xtuc/ieee754@1.2.0
├─ accepts@1.3.7
├─ acorn-jsx@5.1.0
├─ acorn@7.1.0
├─ aggregate-error@3.0.1
├─ ajv-errors@1.0.1
├─ ajv-keywords@3.4.1
├─ ajv@6.10.2
├─ ansi-align@3.0.0
├─ ansi-colors@3.2.4
├─ ansi-html@0.0.7
├─ ansi-regex@4.1.0
├─ anymatch@3.1.1
├─ aproba@1.2.0
├─ argparse@1.0.10
├─ array-find-index@1.0.2
├─ array-flatten@1.1.1
├─ array-uniq@2.1.0
├─ assign-symbols@1.0.0
├─ ast-types@0.9.6
├─ astral-regex@1.0.0
├─ async-each@1.0.3
├─ async-limiter@1.0.1
├─ async@2.6.3
├─ atob@2.1.2
├─ autoprefixer@9.7.3
├─ ava@2.4.0
├─ babel-loader@8.0.6
├─ babel-plugin-dynamic-import-node@2.3.0
├─ babel-plugin-espower@3.0.1
├─ balanced-match@1.0.0
├─ base@0.11.2
├─ batch@0.6.1
├─ big.js@5.2.2
├─ binary-extensions@2.0.0
├─ bluebird@3.7.2
├─ blueimp-md5@2.12.0
├─ body-parser@1.19.0
├─ bonjour@3.5.0
├─ boxen@3.2.0
├─ brace-expansion@1.1.11
├─ braces@2.3.2
├─ browserslist@4.8.2
├─ buffer-from@1.1.1
├─ buffer-indexof@1.1.1
├─ cacache@13.0.1
├─ cache-base@1.0.1
├─ cacheable-request@6.1.0
├─ call-matcher@1.1.0
├─ call-signature@0.0.2
├─ callsites@3.1.0
├─ camel-case@3.0.0
├─ camelcase-keys@4.2.0
├─ caniuse-lite@1.0.30001016
├─ chalk@3.0.0
├─ chardet@0.7.0
├─ chokidar@3.3.1
├─ chownr@1.1.3
├─ chrome-trace-event@1.0.2
├─ chunkd@1.0.0
├─ ci-info@2.0.0
├─ ci-parallel-vars@1.0.0
├─ class-utils@0.3.6
├─ clean-css@4.2.1
├─ clean-stack@2.2.0
├─ clean-yaml-object@0.1.0
├─ cli-boxes@2.2.0
├─ cli-spinners@2.2.0
├─ cli-truncate@2.1.0
├─ cli-width@2.2.0
├─ cliui@6.0.0
├─ clone-response@1.0.2
├─ clone@1.0.4
├─ code-excerpt@2.1.1
├─ code-point-at@1.1.0
├─ collection-visit@1.0.0
├─ color-convert@2.0.1
├─ color-name@1.1.4
├─ commander@2.20.3
├─ common-path-prefix@1.0.0
├─ compressible@2.0.17
├─ compression@1.7.4
├─ concat-map@0.0.1
├─ concordance@4.0.0
├─ configstore@4.0.0
├─ connect-history-api-fallback@1.6.0
├─ consolidate@0.15.1
├─ content-disposition@0.5.3
├─ convert-source-map@1.7.0
├─ convert-to-spaces@1.0.2
├─ cookie-signature@1.0.6
├─ cookie@0.4.0
├─ copy-concurrently@1.0.5
├─ copy-descriptor@0.1.1
├─ core-util-is@1.0.2
├─ cross-spawn@6.0.5
├─ crypto-random-string@1.0.0
├─ css-loader@3.4.0
├─ date-time@2.1.0
├─ de-indent@1.0.2
├─ debug@2.6.9
├─ decamelize-keys@1.1.0
├─ decamelize@1.2.0
├─ decode-uri-component@0.2.0
├─ decompress-response@3.3.0
├─ deep-equal@1.1.1
├─ deep-extend@0.6.0
├─ deep-is@0.1.3
├─ default-gateway@4.2.0
├─ defaults@1.0.3
├─ defer-to-connect@1.1.1
├─ define-properties@1.1.3
├─ destroy@1.0.4
├─ detect-libc@1.0.3
├─ detect-node@2.0.4
├─ dir-glob@3.0.1
├─ dns-equal@1.0.0
├─ dns-packet@1.3.1
├─ dns-txt@2.0.2
├─ doctrine@3.0.0
├─ dot-prop@5.2.0
├─ dotenv@8.2.0
├─ duplexer3@0.1.4
├─ ee-first@1.1.1
├─ electron-to-chromium@1.3.322
├─ emittery@0.4.1
├─ emoji-regex@8.0.0
├─ emojis-list@2.1.0
├─ empower-core@1.2.0
├─ end-of-stream@1.4.4
├─ enhanced-resolve@5.0.0-beta.4
├─ equal-length@1.0.1
├─ errno@0.1.7
├─ error-ex@1.3.2
├─ es-abstract@1.17.0
├─ es-to-primitive@1.2.1
├─ es6-error@4.1.1
├─ es6-templates@0.2.3
├─ eslint@6.8.0
├─ esm@3.2.25
├─ espower-location-detector@1.0.0
├─ espree@6.1.2
├─ esprima@4.0.1
├─ esquery@1.0.1
├─ esrecurse@4.2.1
├─ eventemitter3@4.0.0
├─ events@3.0.0
├─ eventsource@1.0.7
├─ expand-brackets@2.1.4
├─ express@4.17.1
├─ external-editor@3.1.0
├─ extglob@2.0.4
├─ fast-deep-equal@2.0.1
├─ fast-diff@1.2.0
├─ fast-glob@3.1.1
├─ fast-json-stable-stringify@2.1.0
├─ fast-levenshtein@2.0.6
├─ fastparse@1.1.2
├─ fastq@1.6.0
├─ faye-websocket@0.10.0
├─ fibers@4.0.2
├─ file-entry-cache@5.0.1
├─ fill-range@4.0.0
├─ finalhandler@1.1.2
├─ find-cache-dir@2.1.0
├─ flat-cache@2.0.1
├─ flatted@2.0.1
├─ follow-redirects@1.9.0
├─ for-in@1.0.2
├─ forwarded@0.1.2
├─ fs-extra@8.1.0
├─ fs-minipass@2.0.0
├─ fs.realpath@1.0.0
├─ get-caller-file@2.0.5
├─ get-port@5.1.0
├─ get-stream@4.1.0
├─ glob-parent@5.1.0
├─ global-dirs@0.1.1
├─ globals@12.3.0
├─ globby@10.0.1
├─ got@9.6.0
├─ handle-thing@2.0.0
├─ has-value@1.0.0
├─ has-yarn@2.1.0
├─ hasha@5.1.0
├─ he@1.2.0
├─ hosted-git-info@2.8.5
├─ hpack.js@2.1.6
├─ html-entities@1.2.1
├─ html-loader@0.5.5
├─ html-minifier@4.0.0
├─ http-cache-semantics@4.0.3
├─ http-deceiver@1.2.7
├─ http-parser-js@0.4.10
├─ http-proxy-middleware@0.19.1
├─ http-proxy@1.18.0
├─ icss-utils@4.1.1
├─ ignore-by-default@1.0.1
├─ ignore@4.0.6
├─ import-fresh@3.2.1
├─ import-lazy@2.1.0
├─ import-local@2.0.0
├─ indent-string@3.2.0
├─ infer-owner@1.0.4
├─ inflight@1.0.6
├─ inherits@2.0.4
├─ ini@1.3.5
├─ inquirer@7.0.1
├─ internal-ip@4.3.0
├─ invert-kv@2.0.0
├─ ip-regex@2.1.0
├─ ip@1.1.5
├─ ipaddr.js@1.9.1
├─ irregular-plurals@2.0.0
├─ is-absolute-url@3.0.3
├─ is-accessor-descriptor@1.0.0
├─ is-arguments@1.0.4
├─ is-arrayish@0.2.1
├─ is-binary-path@2.1.0
├─ is-callable@1.1.5
├─ is-data-descriptor@1.0.0
├─ is-descriptor@1.0.2
├─ is-error@2.2.2
├─ is-extglob@2.1.1
├─ is-installed-globally@0.1.0
├─ is-npm@3.0.0
├─ is-obj@2.0.0
├─ is-path-cwd@2.2.0
├─ is-path-in-cwd@2.1.0
├─ is-path-inside@1.0.1
├─ is-plain-obj@1.1.0
├─ is-plain-object@2.0.4
├─ is-regex@1.0.5
├─ is-symbol@1.0.3
├─ is-url@1.2.4
├─ is-utf8@0.2.1
├─ is-windows@1.0.2
├─ is-wsl@1.1.0
├─ is-yarn-global@0.3.0
├─ isarray@1.0.0
├─ isexe@2.0.0
├─ jest-worker@24.9.0
├─ js-string-escape@1.0.1
├─ js-tokens@4.0.0
├─ js-yaml@3.13.1
├─ jsesc@2.5.2
├─ json-buffer@3.0.0
├─ json-parse-better-errors@1.0.2
├─ json-schema-traverse@0.4.1
├─ json-stable-stringify-without-jsonify@1.0.1
├─ json3@3.3.3
├─ json5@1.0.1
├─ jsonfile@4.0.0
├─ keyv@3.1.0
├─ killable@1.0.1
├─ kind-of@3.2.2
├─ latest-version@5.1.0
├─ lcid@2.0.0
├─ levn@0.3.0
├─ load-json-file@5.3.0
├─ loader-runner@3.1.0
├─ locate-path@3.0.0
├─ lodash.clonedeep@4.5.0
├─ lodash.islength@4.0.1
├─ lodash.merge@4.6.2
├─ lodash.unescape@4.0.1
├─ log-symbols@2.2.0
├─ loglevel@1.6.6
├─ loud-rejection@2.2.0
├─ lower-case@1.1.4
├─ lowercase-keys@1.0.1
├─ lru-cache@4.1.5
├─ mamacro@0.0.3
├─ map-age-cleaner@0.1.3
├─ map-obj@1.0.1
├─ map-visit@1.0.0
├─ matcher@2.1.0
├─ md5-hex@3.0.1
├─ md5-o-matic@0.1.1
├─ media-typer@0.3.0
├─ mem@4.3.0
├─ memory-fs@0.4.1
├─ meow@5.0.0
├─ merge-descriptors@1.0.1
├─ merge-source-map@1.1.0
├─ merge-stream@2.0.0
├─ merge2@1.3.0
├─ methods@1.1.2
├─ mime-db@1.42.0
├─ mimic-fn@2.1.0
├─ minimalistic-assert@1.0.1
├─ minimatch@3.0.4
├─ minimist-options@3.0.2
├─ minimist@1.2.0
├─ minipass-collect@1.0.2
├─ minipass-flush@1.0.5
├─ minipass-pipeline@1.2.2
├─ minipass@3.1.1
├─ mixin-deep@1.3.2
├─ move-concurrently@1.0.1
├─ ms@2.1.2
├─ multicast-dns-service-types@1.1.0
├─ multicast-dns@6.2.3
├─ mute-stream@0.0.8
├─ nanomatch@1.2.13
├─ natural-compare@1.4.0
├─ negotiator@0.6.2
├─ neo-async@2.6.1
├─ nice-try@1.0.5
├─ node-forge@0.9.0
├─ node-releases@1.1.43
├─ normalize-package-data@2.5.0
├─ normalize-range@0.1.2
├─ normalize-url@4.5.0
├─ num2fraction@1.2.2
├─ number-is-nan@1.0.1
├─ object-assign@4.1.1
├─ object-copy@0.1.0
├─ object-inspect@1.7.0
├─ object-is@1.0.2
├─ object-keys@1.1.1
├─ observable-to-promise@1.0.0
├─ obuf@1.1.2
├─ on-headers@1.0.2
├─ once@1.4.0
├─ one-time@0.0.4
├─ onetime@5.1.0
├─ opn@5.5.0
├─ optionator@0.8.3
├─ ora@3.4.0
├─ original@1.0.2
├─ os-locale@3.1.0
├─ os-tmpdir@1.0.2
├─ p-cancelable@1.1.0
├─ p-defer@1.0.0
├─ p-is-promise@2.1.0
├─ p-limit@2.2.1
├─ p-locate@3.0.0
├─ p-map@2.1.0
├─ p-retry@3.0.1
├─ p-try@2.2.0
├─ package-hash@4.0.0
├─ package-json@6.5.0
├─ param-case@2.1.1
├─ parent-module@1.0.1
├─ parse-ms@2.1.0
├─ pascalcase@0.1.1
├─ path-dirname@1.0.2
├─ path-is-inside@1.0.2
├─ path-key@2.0.1
├─ path-parse@1.0.6
├─ path-to-regexp@0.1.7
├─ path-type@4.0.0
├─ picomatch@2.1.1
├─ pinkie-promise@2.0.1
├─ pinkie@2.0.4
├─ pkg-conf@3.1.0
├─ plur@3.1.1
├─ portfinder@1.0.25
├─ posix-character-classes@0.1.1
├─ postcss-modules-extract-imports@2.0.0
├─ postcss-modules-local-by-default@3.0.2
├─ postcss-modules-scope@2.1.1
├─ postcss-modules-values@3.0.0
├─ postcss-selector-parser@6.0.2
├─ postcss-value-parser@4.0.2
├─ postcss@7.0.25
├─ prepend-http@2.0.0
├─ prettier@1.19.1
├─ pretty-ms@5.1.0
├─ private@0.1.8
├─ process-nextick-args@2.0.1
├─ progress@2.0.3
├─ promise-inflight@1.0.1
├─ proxy-addr@2.0.5
├─ prr@1.0.1
├─ pseudomap@1.0.2
├─ punycode@1.3.2
├─ querystring@0.2.0
├─ querystringify@2.1.1
├─ quick-lru@1.1.0
├─ raw-body@2.4.0
├─ read-pkg-up@3.0.0
├─ read-pkg@3.0.0
├─ readable-stream@2.3.6
├─ readdirp@3.3.0
├─ recast@0.11.23
├─ redent@2.0.0
├─ regenerate-unicode-properties@8.1.0
├─ regexp.prototype.flags@1.3.0
├─ regexpp@2.0.1
├─ regexpu-core@4.6.0
├─ registry-auth-token@4.0.0
├─ registry-url@5.1.0
├─ regjsgen@0.5.1
├─ regjsparser@0.6.2
├─ relateurl@0.2.7
├─ release-zalgo@1.0.0
├─ remove-trailing-separator@1.1.0
├─ repeat-element@1.1.3
├─ require-main-filename@2.0.0
├─ require-precompiled@0.1.0
├─ resolve-from@5.0.0
├─ resolve-url@0.2.1
├─ resolve@1.14.1
├─ responselike@1.0.2
├─ restore-cursor@3.1.0
├─ ret@0.1.15
├─ retry@0.12.0
├─ reusify@1.0.4
├─ rimraf@2.7.1
├─ run-async@2.3.0
├─ run-parallel@1.1.9
├─ run-queue@1.0.3
├─ rxjs@6.5.3
├─ safer-buffer@2.1.2
├─ sass@1.24.0
├─ say@0.16.0
├─ schema-utils@2.6.1
├─ select-hose@2.0.0
├─ selfsigned@1.10.7
├─ semver-diff@2.1.0
├─ semver@5.7.1
├─ serialize-error@2.1.0
├─ serialize-javascript@2.1.2
├─ serve-index@1.9.1
├─ serve-static@1.14.1
├─ set-value@2.0.1
├─ shebang-regex@1.0.0
├─ slice-ansi@2.1.0
├─ snapdragon-node@2.1.1
├─ snapdragon-util@3.0.1
├─ sockjs-client@1.4.0
├─ sockjs@0.3.19
├─ source-list-map@2.0.1
├─ source-map-resolve@0.5.2
├─ source-map-support@0.5.16
├─ source-map-url@0.4.0
├─ source-map@0.7.3
├─ spdx-correct@3.1.0
├─ spdx-exceptions@2.2.0
├─ spdy-transport@3.0.0
├─ spdy@4.0.1
├─ split-string@3.1.0
├─ sprintf-js@1.0.3
├─ ssri@7.1.0
├─ stack-utils@1.0.2
├─ static-extend@0.1.2
├─ string_decoder@1.1.1
├─ string.prototype.trimleft@2.1.1
├─ string.prototype.trimright@2.1.1
├─ strip-bom-buf@2.0.0
├─ strip-indent@2.0.0
├─ strip-json-comments@3.0.1
├─ supertap@1.0.0
├─ symbol-observable@1.2.0
├─ table@5.4.6
├─ tapable@2.0.0-beta.9
├─ term-size@1.2.0
├─ terser-webpack-plugin@2.3.1
├─ terser@4.4.3
├─ text-table@0.2.0
├─ through@2.3.8
├─ thunky@1.1.0
├─ time-zone@1.0.0
├─ tmp@0.0.33
├─ to-fast-properties@2.0.0
├─ to-object-path@0.3.0
├─ to-readable-stream@1.0.0
├─ to-regex-range@2.1.1
├─ trim-newlines@2.0.0
├─ trim-off-newlines@1.0.1
├─ trim-right@1.0.1
├─ tslib@1.10.0
├─ type-fest@0.8.1
├─ type-is@1.6.18
├─ typedarray-to-buffer@3.1.5
├─ typescript@3.7.4
├─ uglify-js@3.7.2
├─ uid2@0.0.3
├─ unicode-canonical-property-names-ecmascript@1.0.4
├─ unicode-match-property-ecmascript@1.0.4
├─ unicode-match-property-value-ecmascript@1.1.0
├─ unicode-property-aliases-ecmascript@1.0.5
├─ union-value@1.0.1
├─ unique-filename@1.1.1
├─ unique-slug@2.0.2
├─ unique-string@1.0.0
├─ unique-temp-dir@1.0.0
├─ universalify@0.1.2
├─ unpipe@1.0.0
├─ unset-value@1.0.0
├─ upath@1.2.0
├─ update-notifier@3.0.1
├─ upper-case@1.1.3
├─ uri-js@4.2.2
├─ urix@0.1.0
├─ url-parse-lax@3.0.0
├─ url@0.11.0
├─ use@3.1.1
├─ util-deprecate@1.0.2
├─ utils-merge@1.0.1
├─ uuid@3.3.3
├─ v8-compile-cache@2.1.0
├─ validate-npm-package-license@3.0.4
├─ vue-hot-reload-api@2.3.4
├─ vue-loader@15.8.3
├─ vue-style-loader@4.1.2
├─ vue-template-compiler@2.6.11
├─ vue-template-es2015-compiler@1.9.1
├─ watchpack@2.0.0-beta.10
├─ wbuf@1.7.3
├─ wcwidth@1.0.1
├─ webpack-dev-middleware@3.7.2
├─ webpack-dev-server@3.10.1
├─ webpack-sources@2.0.0-beta.8
├─ webpack@5.0.0-beta.10
├─ websocket-extensions@0.1.3
├─ well-known-symbols@2.0.0
├─ widest-line@2.0.1
├─ word-wrap@1.2.3
├─ worker-farm@1.7.0
├─ wrap-ansi@6.2.0
├─ write-file-atomic@3.0.1
├─ write@1.0.3
├─ ws@6.2.1
├─ xtend@4.0.2
├─ y18n@4.0.0
├─ yallist@3.1.1
├─ yargs-parser@16.1.0
└─ yargs@15.0.2
PS D:\VS\instapack> tsc --version
Version 3.7.4

Upgraded TypeScript version to the very latest, issue still persist...

src/TypeScriptBuildEngine.ts:473:72 - error TS2345: Argument of type '(compilation: Compilation) => void' is not assignable to parameter of type '(args_0: Compilation) => { normalModuleFactory: NormalModuleFactory; }'.                                        Type 'void' is not assignable to type '{ normalModuleFactory: NormalModuleFactory; }'.                                                                                                                                                                        473             compiler.hooks.compilation.tap('typescript-minify-notify', compilation => {                                                                                                                ~~~~~~~~~~~~~~~~                                                                                                                                                                                                                                                                                                     Found 1 error.                                                                                                                                                                                                                                                  
zhangwilling commented 4 years ago

maybe it is caused by @types/webpack

the type of compiler.hooks.compilation is compilation: SyncHook<Compilation, { normalModuleFactory: NormalModuleFactory }>;

alexander-akait commented 3 years ago

Yep, but in @types/webpack, anyway webpack@5 provide own types, feel free to feedback