Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with speed-measure-webpack-plugin #1090

Closed
jimmydief opened this issue Oct 25, 2018 · 7 comments
Closed

Incompatibility with speed-measure-webpack-plugin #1090

jimmydief opened this issue Oct 25, 2018 · 7 comments

Comments

@jimmydief
Copy link

Expected behavior

I would like to be able to continue using speed-measure-webpack-plugin to monitor build timings with the latest beta version of html-webpack-plugin.

Current behavior

The changes to reuse a single child compiler (#967) are awesome but unfortunately introduce an incompatibility with the way that speed-measure-webpack-plugin works. speed-measure-webpack-plugin uses a Proxy to wrap the compiler object which results in multiple child compilers being created by html-webpack-plugin (one for the original compiler and another for the wrapped one). This causes the following error because the templates are only set on one of the child compilers.

ERROR in   TypeError: Cannot read property 'hash' of undefined

  - compiler.js:292 childCompiler.compileTemplates.then
    [html-speed-measure-webpack-plugin-bug-repro]/[html-webpack-plugin]/lib/compiler.js:292:30

Happy to help fix but not sure which plugin is really at fault here.

Environment

Node.js v8.11.1
darwin 17.7.0
npm 5.6.0
webpack 4.23.0
html-webpack-plugin 4.0.0-beta.2

Config

Reproduction repo

@chulanovskyi
Copy link

Any updates about this? Really want to track down why the build time of my project is taking 18 minutes (!) long :)

@jantimon
Copy link
Owner

I guess nobody is working on it.
Could you please grab a debugger and find out why the wrapped compiler has no hash?

@queentvxq
Copy link

remove speed-measure-webpack-plugin

@xygcxy
Copy link

xygcxy commented Mar 6, 2019

I meet the same error and compiler failed and i remove speed-measure-webpack that can compiler success. It seems that two plugin has compatible problem.

@jantimon
Copy link
Owner

@XianZhengquan
Copy link

Didn't solve this problem?

@jantimon
Copy link
Owner

I'll close this for now as nobody seems to work on this issue and https://github.com/jantimon/cpuprofile-webpack-plugin can provide more accurate speed measurements.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants