speed-measure-webpack-plugin icon indicating copy to clipboard operation
speed-measure-webpack-plugin copied to clipboard

Incompatibility with hard-source-webpack-plugin…

Open tdd opened this issue 6 years ago • 11 comments

Hey there!

This plugin is awesome, unfortunately it seems to break another fav plugin of mine, hard-source-webpack-plugin, that is currently the most effective caching layer Webpack has (including v4). First run will work fine, later runs, once a cache exist, will break when this plugin exists.

This may be due to its not properly using v4’s plugin API yet? No idea. Still, this prevents me from using it everywhere right now. It'd be super sweet if you could coordinate with HS' author to figure this out.

Thanks a ton!

tdd avatar Mar 05 '18 10:03 tdd

Hey @tdd - thanks for raising this :)

If you're using SMP with webpack v4, then yeah - there's no guarantee that anything will work, just yet! Hopefully I should get the time to add support soon.

If you're using it with another webpack version, though, then this should work. I'll have a look tonight, and see what the issue is.

stephencookdev avatar Mar 05 '18 19:03 stephencookdev

Right, so I've found an issue with HardSourceWebpackPlugin, which I've raised a fix for: https://github.com/stephencookdev/speed-measure-webpack-plugin/pull/23

I'm just worried it doesn't perfectly describe what you described in this issue... Could you check out the branch and see if that fixes it for you?

And if not, could you give me a bit more info? (Specifically, which webpack version, smp version, and HardSourceWebpackPlugin version you're using)

stephencookdev avatar Mar 06 '18 23:03 stephencookdev

I'll assume this is complete with https://github.com/stephencookdev/speed-measure-webpack-plugin/pull/23 (there are some tests verifying this now with https://github.com/stephencookdev/speed-measure-webpack-plugin/pull/24)

But let me know / reopen this if you're seeing any more issue

stephencookdev avatar Mar 08 '18 00:03 stephencookdev

Hey Stephen,

Thanks for the work! Looks promising, but it keeps breaking for me. OTOH, I'm using this on v4, so this might be where the issue lies. Didn't try on v3. Best,

On Thu, Mar 8, 2018, at 01:20, Stephen Cook wrote:

I'll assume this is complete with #23[1] (there are some tests verifying this now with #24[2])> But let me know / reopen this if you're seeing any more issue

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub[3], or mute the thread[4].>

-- Christophe Porteneuve [email protected]

Links:

  1. https://github.com/stephencookdev/speed-measure-webpack-plugin/pull/23
  2. https://github.com/stephencookdev/speed-measure-webpack-plugin/pull/24
  3. https://github.com/stephencookdev/speed-measure-webpack-plugin/issues/21#issuecomment-371333146
  4. https://github.com/notifications/unsubscribe-auth/AAAOqPXWz1210xAyZXBwVxgzi7yshwnNks5tcHk9gaJpZM4ScCkB

tdd avatar Mar 08 '18 01:03 tdd

Doesn't work for me with hard-source-webpack-plugin as well

piotrpalek avatar Mar 12 '19 14:03 piotrpalek

This doesn't seem to be fixed:

[hard-source:core] Tracking environment changes with package-lock.json.
[hard-source:core] HardSourceWebpackPlugin is reading from and writing to a confighash path: /Users/fabian/projects/web-builder/node_modules/.cache/hard-source/bc1fef381bebecdee4df1ec889d2f86bec404e8030b8597e10ecb6203c756867
✖ 「wdm」: TypeError: Cannot read property 'call' of undefined
    at Object.exports.call (/Users/fabian/projects/web-builder/node_modules/hard-source-webpack-plugin/lib/util/plugin-compat.js:171:17)
    at Proxy.run (/Users/fabian/projects/web-builder/node_modules/hard-source-webpack-plugin/lib/SystemArchetype.js:184:20)
    at args (/Users/fabian/projects/web-builder/node_modules/speed-measure-webpack-plugin/WrappedPlugin/index.js:52:19)
    at _promise2.then._result2 (eval at create (/Users/fabian/projects/web-builder/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:28:1)```
$ npm ls
...
├─┬ [email protected]
...
├─┬ [email protected]

FabianFrank avatar Apr 02 '19 18:04 FabianFrank

Not fixed in 1.3.1 with webpack watch

 WAIT  Compiling...09:04:54
TypeError: Cannot read property 'call' of undefined
    at ManifestPlugin.<anonymous> (C:\www\rdv-v2.e-synaps.com\node_modules\webpack-manifest-plugin\lib\plugin.js:191:53)
    at args (C:\www\rdv-v2.e-synaps.com\node_modules\speed-measure-webpack-plugin\WrappedPlugin\index.js:52:19)
    at _next1 (eval at create (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)
    at _err1 (eval at create (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:25:1)
    at func.apply.argsButLast.map.concat.callbackArgs (C:\www\rdv-v2.e-synaps.com\node_modules\speed-measure-webpack-plugin\WrappedPlugin\index.js:44:9)
    at Proxy.emit (C:\www\rdv-v2.e-synaps.com\node_modules\@symfony\webpack-encore\lib\friendly-errors\asset-output-display-plugin.js:27:9)
    at args (C:\www\rdv-v2.e-synaps.com\node_modules\speed-measure-webpack-plugin\WrappedPlugin\index.js:40:16)
    at _next0 (eval at create (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:21:1)
    at _err0 (eval at create (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:34:1)
    at func.apply.argsButLast.map.concat.callbackArgs (C:\www\rdv-v2.e-synaps.com\node_modules\speed-measure-webpack-plugin\WrappedPlugin\index.js:44:9)
    at Proxy.emit (C:\www\rdv-v2.e-synaps.com\node_modules\@symfony\webpack-encore\lib\webpack\delete-unused-entries-js-plugin.js:46:9)
    at args (C:\www\rdv-v2.e-synaps.com\node_modules\speed-measure-webpack-plugin\WrappedPlugin\index.js:40:16)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:30:1)
    at Compiler.emitAssets (C:\www\rdv-v2.e-synaps.com\node_modules\webpack\lib\Compiler.js:441:19)
    at onCompiled (C:\www\rdv-v2.e-synaps.com\node_modules\webpack\lib\Watching.js:50:19)
    at hooks.afterCompile.callAsync.err (C:\www\rdv-v2.e-synaps.com\node_modules\webpack\lib\Compiler.js:631:15)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:15:1)
    at compilation.seal.err (C:\www\rdv-v2.e-synaps.com\node_modules\webpack\lib\Compiler.js:628:31)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\Hook.js:154:20)
    at hooks.optimizeAssets.callAsync.err (C:\www\rdv-v2.e-synaps.com\node_modules\webpack\lib\Compilation.js:1329:35)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\Hook.js:154:20)
    at hooks.optimizeChunkAssets.callAsync.err (C:\www\rdv-v2.e-synaps.com\node_modules\webpack\lib\Compilation.js:1320:32)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\Hook.js:154:20)
    at hooks.additionalAssets.callAsync.err (C:\www\rdv-v2.e-synaps.com\node_modules\webpack\lib\Compilation.js:1315:36)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\Hook.js:154:20)
    at hooks.optimizeTree.callAsync.err (C:\www\rdv-v2.e-synaps.com\node_modules\webpack\lib\Compilation.js:1311:32)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\Hook.js:154:20)
    at Compilation.seal (C:\www\rdv-v2.e-synaps.com\node_modules\webpack\lib\Compilation.js:1248:27)
    at compilation.finish.err (C:\www\rdv-v2.e-synaps.com\node_modules\webpack\lib\Compiler.js:625:18)
    at hooks.finishModules.callAsync.err (C:\www\rdv-v2.e-synaps.com\node_modules\webpack\lib\Compilation.js:1171:4)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\www\rdv-v2.e-synaps.com\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:15:1)

esynaps avatar May 29 '19 07:05 esynaps

Thanks for your comments everyone. Will reopen and try and find some time to investigate

But I'm a little stretched for time with this, so would appreciate if anyone else has time to poke around at the failure too

stephencookdev avatar May 29 '19 07:05 stephencookdev

any update on this? Is there a way to make this work otherwise?

bovas85 avatar Apr 23 '20 08:04 bovas85

still not working:

hunnble avatar Mar 09 '21 07:03 hunnble

still not working well: [email protected] [email protected] It works when first packaged, it says something wrong when I change the code.

soredtrose avatar Jan 13 '23 06:01 soredtrose