We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
Hi! It's a cool idea to pipe webpack --watch into jekyll serve so the Webpack recompilation triggers the change detection in Jekyll. I've never seen this before!
However, it doesn't work well for one-shot builds. If Jekyll finishes the build earlier than Webpack, the latter dies with ERR_STREAM_DESTROYED. So for the "build" script, there should be a && operator instead of a | (pipe).
Hi Michael, great article, thanks a lot! If I may, I would make a couple of suggestions (without being an expert):
1. I found a couple of dependency issues with babel there when doing the setup, nothing that a couple of npm installs couldn't fi and one modification to the webpack config, but it might be worth checking it for any newcomers to this page (in case they run into the same issues)
2. I had problems with webpack failing to bundle, but it wasn't highlighted in the terminal by the npm script that I added as per your instructions above. So, I instead opted for foreman, which is an extra dev dependency, but allows for a really good view of any issues in either process (or multiple, as the case may be). I got started using this: http://www.hi5dev.com/jekyl... and I would highly recommend!
Hope it might be useful for anyone else in my position.
Thanks again!
Thanks for the handy guide. I've got this working successfully on a test Jekyll site but had to use the @babel/core dependency to avoid errors.
You’re very welcome Joel. Glad I could help!
Unfortunately, piping
webpack --watchintojekyll serve --livereloaddoesn't completely work for me... Sometimes the page will start reloading before webpack is done building it, and then I either get the old page, or a corrupt one.