speed-measure-webpack-plugin
speed-measure-webpack-plugin copied to clipboard
Does it work with webpack 5?
I can't seem to make it work on webpack 5
It's the exception I encountered for future reference.
[webpack-cli] Promise rejection: TypeError: 'get' on proxy: property 'tapAsync' is a read-only and non-configurable data property on the proxy target but the proxy did not return its actual value (expected '(options, fn) => {
processAssetsHook.tapAsync(
getOptions(options),
(assets, callback) =>
...<omitted>... }' but got 'function () { [native code] }')
[webpack-cli] TypeError: 'get' on proxy: property 'tapAsync' is a read-only and non-configurable data property on the proxy target but the proxy did not return its actual value (expected '(options, fn) => {
processAssetsHook.tapAsync(
getOptions(options),
(assets, callback) =>
...<omitted>... }' but got 'function () { [native code] }')
at Proxy.<anonymous> (/project/node_modules/copy-webpack-plugin/dist/index.js:340:42)
at /speed-measure-webpack-plugin/WrappedPlugin/index.js:52:19
at Hook.eval [as call] (eval at create (/project/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
at Hook.CALL_DELEGATE [as _call] (/project/node_modules/webpack/node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation (/project/node_modules/webpack/lib/Compiler.js:918:30)
at /project/node_modules/webpack/lib/Compiler.js:960:29
at Hook.eval [as callAsync] (eval at create (/project/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/project/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
at Compiler.compile (/project/node_modules/webpack/lib/Compiler.js:955:28)
at /project/node_modules/webpack/lib/Watching.js:113:19
at _next0 (eval at create (/project/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
at eval (eval at create (/project/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:26:1)
Got the same issue.
Got the same issue.
Got the same issue.
Got the same issue.
Got the same issue.
Got the same issue.
Got the same issue.
It still doesn't work on webpack 5.11.0
Got the same issue.
If you have the same issue, everybody, please just put a "thumbs-up" reaction on the original post, instead of replying "me too". This is important because everyone watching the issue for news will be notified every time you leave a comment.
Tried the version in the PR to this issue but another error happened. This time is with html-webpack-plugin 5.0.0-beta.5.
[webpack-cli] TypeError: Cannot read property 'PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE' of undefined
at Proxy.<anonymous> (/var/app/web/node_modules/html-webpack-plugin/index.js:222:31)
at /var/app/web/node_modules/speed-measure-webpack-plugin/WrappedPlugin/index.js:52:19
at Hook.eval [as call] (eval at create (/var/app/web/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:52:1)
at Hook.CALL_DELEGATE [as _call] (/var/app/web/node_modules/webpack/node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation (/var/app/web/node_modules/webpack/lib/Compiler.js:990:30)
at /var/app/web/node_modules/webpack/lib/Compiler.js:1033:29
at Hook.eval [as callAsync] (eval at create (/var/app/web/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:22:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/var/app/web/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
at Compiler.compile (/var/app/web/node_modules/webpack/lib/Compiler.js:1028:28)
at /var/app/web/node_modules/webpack/lib/Compiler.js:471:12
at Compiler.readRecords (/var/app/web/node_modules/webpack/lib/Compiler.js:869:11)
at /var/app/web/node_modules/webpack/lib/Compiler.js:468:11
at Hook.eval [as callAsync] (eval at create (/var/app/web/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:34:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (/var/app/web/node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
at /var/app/web/node_modules/webpack/lib/Compiler.js:465:20
at Hook.eval [as callAsync] (eval at create (/var/app/web/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:22:1)
ERROR: 2
[webpack-cli] TypeError: Cannot read property 'PROCESS_ASSETS_STAGE_ADDITIONS' of undefined
Same here with Webpack 5.20+ and SMP 1.4.2
(node:11916) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader
(node:11916) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE' of undefined
at Proxy.
版本问题????
Putting this here as I believe it to be webpack 5 related and I tried the mini-css fix of putting it to 1.35.
I get this error below:
Error: ObjectMiddleware.register: serializer for mini-css-extract-plugin/dist/CssModule/null is already registered ... at Object.register ... at Function.getCssModule ... at MiniCssExtractPlugin.apply
@SamuelTrew - I get the exact same error. Did you find a solution?
@SamuelTrew - I get the exact same error. Did you find a solution?
I ended up removing the @types/webpack dependency as it is apparently deprecated with webpack 5. That fixed it as I believe it was referring to old types
@SamuelTrew I've got the same error as you, but I do not have @types/webpack dependency. Do you know if some nested dependency can cause it?
Checking my config file, i've been using the mini-css three times (to generate different filenames, to maintain retrocompatibility) and works fine without speed-measure. Maybe something related to that.
Hi guys, I am writing a successor of this plugin: https://github.com/ShuiRuTian/time-analytics-webpack-plugin.
You could have a try with it. I believe it's providing a better experience for webpack 5.
It's in an early period(the API is not frozen and maybe buggy), but it's working for me.
Any feedback is welcomed!
Working but getting this,
[DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader
"webpack": "^5.65.0", (apparently also on 5.75.0 still happening) "speed-measure-webpack-plugin": "^1.5.0",
webpack has deprecated that hook but speed measure plugin still referencing it.
Original https://github.com/stephencookdev/speed-measure-webpack-plugin/issues/123