Open 9999years opened 5 years ago
The version published on the NPM is on the branch v0.1.0
.
Seems the delay is introduced during this promise chain index.js#L20-L43.
There are 5 steps during these promises.
{ path: '', data: ''}
mappings (path
is for hexo to register the route)Hmm, somewhere around there, but I’m not sure if that's exactly it. I added some simple logging statements to the promises:
05:24:08.867 INFO [hexo-webpack] webpack install plugin
05:24:08.868 INFO [hexo-webpack] webpack install plugin finished # 0.001 seconds
05:24:08.868 INFO [hexo-webpack] webpack compile
05:24:09.951 INFO [hexo-webpack] webpack compile finished # ≈1 second
05:24:09.954 DEBUG Generator: asset # ≈5 seconds !!!!!
05:24:15.001 INFO [hexo-webpack] toRoutes
05:24:15.057 INFO [hexo-webpack] toRoutes finished # 0.05 seconds
05:24:15.058 INFO [hexo-webpack] flatten
05:24:15.058 INFO [hexo-webpack] flatten finished # ≈0 seconds
05:24:15.058 INFO [hexo-webpack] recording route # ≈0 seconds
Each of the steps took a really short time (and, except for the last one, only ran once), but there's still that weird delay after “Generator: asset”. What prints that? Is that just where a bunch of promises are waited on?
Hey, I love this plugin but it seems to add a weird delay. Log output:
Between the
Generator: asset
line and the first output from hexo-webpack is a 5-second delay, which adds a lot of time to my development feedback loop (5 seconds to see a new page every time I hit save). I'd love to contribute to hexo-webpack (although I may not be able to before September due to corporate restrictions), but I'm not sure where the delay might be. Is 'starting up' webpack causing a delay? I don't think it's caused by parsing mywebpack.config.js
; I tried adding debugconsole.log
statements and it was pretty much instant.Thanks!!!