we are using plonetheme-webpack-plugin (thanks @datakurre for it!!) but I just discovered a little big problem with it:
We took the decision 5 years ago to rename our plone instance ID to website rather than the usual Plone.
So far so good as one can define that on plonetheme-webpack-plugin, but when trying to load CSS and JS from a Robot Framework test, it gets a 404 as, by default, plone.app.testing creates an instance with Plone id.
A possible solution would be to allow on plone.app.testing to get the instance ID from an environment variable, but I'm not sure that's the best solution.
Is there a reason why you cannot build a bundles with working Webpack public path for tests? Bundles in CVS? It may be that public path can also work when relative (++theme++something). I don't remember anymore why I chose absolute path (we are actually setting public path to separate server to serve those resources outside Plone).
Are you saying you hardcode the site-id in the resource urls in your diazo template file? If I understand you correct, maybe the dynamic portlal_url could help you.
If you find time, please, contribute some of this into docs. Probably into collective.webpacktemplate. Eg. sharing your test configuration there would be awesome.
Btw, what why "copy: null"? What does it do or is expected to do?
Regarding the copy: null, literally no idea. We got the webpack configuration from the bobtemplates skeleton, so maybe it was there? I removed it and things are still working