Build version of plugin doesn't contain assets/js folder.
We need to copy block.json file with the metadata to assets/dist directory and load it from there.
[MAILPOET-3920]
We need to share the same output path (assets/build/js) in more configs
in order to generate a common manifest.json file.
The cleanup plugin and also build-in output.clean setting do the cleanup on emit
and that causes that they delete files we want to keep.
Using different output paths solves the problem with cleanup but it causes that we generate a bunch of manifest.json files
instead of one.
As simplest workaround I chose cleaning the output directory before we trigger the Webpack build in the Robofile.
[MAILPOET-3214]
We used to need to expose much more libraries for the premium plugin.
Some time ago we moved a lot of premium functionality to the free plugin
and we don't need to expose those modules any more.
[MAILPOET-3214]
This is a replacement for previous admin_vendor_chunk
see 422245e3e6/webpack.config.js (L235-L251)
The automatic splitting based on minChunks seems to give better results.
[MAILPOET-3214]
We used custom script because we were stuck with the old version the cleanup plugin and it had some issues.
Now with webpack5 we can use the plugin again.
[MAILPOET-3214]
Eslint was not able to load chai with webpack import loader due error:
Package path . is not exported from package /node_modules/chai (see exports field in chai/package.json)
Pointing directly to node_modules/chai/index.js bypasses checking exports property in package.json
[MAILPOET-3214]
The path is required in css module which we use for parsing
custom css string in the form editor.
We don't use functionality which is dependent on nodejs path module
so we can use "dummy" module. Alternatively we could install a polyfill for brower
for the path module but it would increase a package size with functions we don't use.
[MAILPOET-3214]
Form editor and settings used to have a separate configs because we
they use lodash and it conflicted with underscore in newsletter edtior.
We had recently fixed that conflict and now we can add them to admin.
This also resolves an issue with multiple loading of @emotion/react
[MAILPOET-3654]
The cleanup plugin was not working properly as it is not designed for multi config environments.
It deleted tests assets after they were built.
[MAILPOET-3673]