s-panferov / awesome-typescript-loader

Awesome TypeScript loader for webpack
Other
2.35k stars 179 forks source link

Webpack 4: DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead #558

Open sonicoder86 opened 6 years ago

sonicoder86 commented 6 years ago

When using the loader with Webpack 4 I get this error message: DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead. It works, but always show deprecation message.

The corresponding stack trace:

(node:55845) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
    at setupWatchRun (/Users/home/node_modules/awesome-typescript-loader/src/instance.ts:367:11)
    at Object.ensureInstance (/Users/home/node_modules/awesome-typescript-loader/src/instance.ts:135:2)
    at compiler (/Users/home/node_modules/awesome-typescript-loader/src/index.ts:47:19)
    at Object.loader (/Users/home/node_modules/awesome-typescript-loader/src/index.ts:16:12)
    at LOADER_EXECUTION (/Users/home/node_modules/loader-runner/lib/LoaderRunner.js:119:14)
    at runSyncOrAsync (/Users/home/node_modules/loader-runner/lib/LoaderRunner.js:120:4)
    at iterateNormalLoaders (/Users/home/node_modules/loader-runner/lib/LoaderRunner.js:229:2)
    at Array.<anonymous> (/Users/home/node_modules/loader-runner/lib/LoaderRunner.js:202:4)
    at Storage.finished (/Users/home/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:43:16)
    at provider (/Users/home/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:79:9)
    at /Users/home/node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:513:3)

You can print out the stack trace with node --trace-deprecation ./node_modules/.bin/webpack.

grzegorzjudas commented 6 years ago

Yup, new webpack changed the APIs: https://github.com/webpack/webpack/issues/6568#issuecomment-373068943

thescientist13 commented 6 years ago

seems like this would be solved as part of an upgrade to #534

muzea commented 6 years ago

see this commit https://github.com/s-panferov/awesome-typescript-loader/commit/149ce3dc81ce0994e6efad643534a6f7d75a7cb3 Now this problem is solved.

waspar commented 5 years ago

Still have this warning node v8.14.1 webpack v4.29.2