This is almost a straight copy from the cockpit-composer repo.
Configured Webpack and setup of cockpit to support building and running image builder as a cockpit plugin (On-premise)