Plone 5 frontend development plugin for webpack

TL; DR; webpack built themes work just fine with Plone 5.1

FYI. The currently available version of plonetheme.webpacktemplate does not fully work on Plone 5.1, but I'll push a working version at least when 5.1 is released.

For a some time ago there was major refactoring of structure pattern in plone/mockup. The new version introduced "dynamic require calls", which need some extra care with webpack. So far, I have only been able to make it work with a filesystem checkout of mockup, so that even webpack gets all other JS, CSS and LESS are bundle directly from Plone, structure pattern must be built from file system.

Luckily, the required mockup checkout can be defined transparently in package.json and override definations required in webpack.config.js only make a nice example, how to override the default Plone-shipped pattern versions with customized file system ones (and even the current plonetheme.webpacktempate does it to fixed version of a single pattern).

So, after all, not being able to webpack-bundle structure pattern directly from Plone 5.1 will but more of a theoretical problem than a real issue.

PS. A nice bonus we are getting from webpack: We can deliver the bundles (CSS, JS, fonts) outside Plone from a separate httpd with proper gzip and http2 support.