focalboard
focalboard copied to clipboard
Tech Debt: reduce plugin (Webpack) bundle size by deduplicating `static/` files
Summary
If you view the static
directory inside of the Webpack bundle directory, notice that asset files exist twice e.g. file.ext
and file..ext
.
Viewed from the root focalboard
directory:
![image](https://user-images.githubusercontent.com/6335792/187534541-07a75861-f992-4716-8bee-8e8b8a349acf.png)
![image](https://user-images.githubusercontent.com/6335792/187534595-65b2786c-4163-4340-aeb1-80f087954389.png)
The problem likely exists in our Webpack configs. Points of interest:
https://github.com/mattermost/focalboard/blob/31569c655a128a36bb495f3a05e5971122f12259/webapp/webpack.common.js#L69-L75
https://github.com/mattermost/focalboard/blob/31569c655a128a36bb495f3a05e5971122f12259/webapp/webpack.common.js#L87-L91
https://github.com/mattermost/focalboard/blob/31569c655a128a36bb495f3a05e5971122f12259/mattermost-plugin/webapp/webpack.config.js#L114-L120
Additional context
The "original" file with out the double ..
appears to be processed/compressed i.e.
$ ls -alh mattermost-plugin/dist/focalboard/pack/static/addDescription*
-rw-r--r-- 1 paul staff 62K Aug 30 14:42 mattermost-plugin/dist/focalboard/pack/static/addDescription..png
-rw-r--r-- 1 paul staff 25K Aug 30 14:42 mattermost-plugin/dist/focalboard/pack/static/addDescription.png