ShuiRuTian / time-analytics-webpack-plugin

Analytics the time cost of loaders and plugins in webpack, to optimise accordingly.
31 stars 0 forks source link

[BUG] Same error as at speed-measure-webpack-plugin #3

Closed FBRAA closed 1 year ago

FBRAA commented 1 year ago
(node:5444) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader
    at getNormalModuleLoader (/home/yashkov/etagi/etagi.com/node_modules/webpack/lib/Compilation.js:436:39)
    at Object.get normalModuleLoader [as normalModuleLoader] (/home/yashkov/etagi/etagi.com/node_modules/webpack/lib/Compilation.js:870:12)
    at Object.get (/home/yashkov/etagi/etagi.com/node_modules/time-analytics-webpack-plugin/ProxyPlugin.ts:98:29)
    at /home/yashkov/etagi/etagi.com/node_modules/@loadable/webpack-plugin/lib/index.js:127:23
    at /home/yashkov/etagi/etagi.com/node_modules/time-analytics-webpack-plugin/ProxyPlugin.ts:290:33
    at Hook.eval [as callAsync] (eval at create (/home/yashkov/etagi/etagi.com/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/yashkov/etagi/etagi.com/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
    at /home/yashkov/etagi/etagi.com/node_modules/webpack/lib/Compiler.js:1171:20
    at Hook.eval [as callAsync] (eval at create (/home/yashkov/etagi/etagi.com/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
    at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/home/yashkov/etagi/etagi.com/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)

To Reproduce

import AssetsPlugin from 'assets-webpack-plugin'; import LoadablePlugin from '@loadable/webpack-plugin'; import TerserPlugin from 'terser-webpack-plugin'; import CompressionPlugin from 'compression-webpack-plugin'; import NodePolyfillWebpackPlugin from 'node-polyfill-webpack-plugin'; import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'; const { TimeAnalyticsPlugin } = require('time-analytics-webpack-plugin');

and lots of different loaders

Nontheless, it worked: image

ShuiRuTian commented 1 year ago

Thanks for the feedback!

The issue should has been fixed in https://github.com/ShuiRuTian/time-analytics-webpack-plugin/pull/4. If you are interested in the details, please reference the comments in the PR.

A new version 0.1.20 is published.

And I noticed that some performance could be improved during fixing this bug. Really a good issue, thanks again!