stable

Clone or download

Read-only

request #20149: Use ESBuild to transpile and minimize the JS/TS and CSS code

This contribution replaces terser-webpack-plugin/Terser, css-minimizer-webpack-plugin/cssnano and babel-loader/Babel by esbuild-loader/ESBuild. This is a trade-off between build performances and asset sizes. In our situation where the first load does not matter that much, it is probably acceptable (and it's not impossible we gain back those bytes in the future). The persistent file caching of Webpack has been disabled. With this new setup and the concurrent build of the packages it does not seem to bring a lot of improvements but it increases the I/O load. We probably can gain a bit from it but it requires more tweaking that might not be worth it right now. There is a small code modification in the document plugin to workaround an edge case (fixed upstream) regarding the minification of the object spread. Change-Id: I3c9fe7af77033f9a40cab1b0dbdb00356f491761

Modified Files

Name
M package-lock.json +521 −3218 Go to diff View file
M package.json +1 −4 Go to diff View file
M plugins/agiledashboard/webpack.common.js +2 −9 Go to diff View file
M plugins/artifactsfolders/webpack.common.js +1 −4 Go to diff View file
M plugins/bugzilla_reference/webpack.common.js +1 −4 Go to diff View file
M plugins/crosstracker/webpack.common.js +0 −1 Go to diff View file
M plugins/docman/webpack.common.js +1 −5 Go to diff View file
M plugins/document/scripts/document/components/Folder/ModalDeleteItem/ModalConfirmDeletion.vue +4 −4 Go to diff View file
M plugins/document/webpack.common.js +0 −1 Go to diff View file
M plugins/frs/webpack.common.js +0 −1 Go to diff View file
M plugins/git/webpack.common.js +0 −2 Go to diff View file
M plugins/graphontrackersv5/webpack.common.js +0 −1 Go to diff View file
M plugins/hudson/webpack.common.js +1 −5 Go to diff View file
M plugins/hudson_git/webpack.common.js +0 −2 Go to diff View file
M plugins/label/webpack.common.js +0 −1 Go to diff View file
M plugins/oauth2_server/webpack.common.js +0 −2 Go to diff View file
M plugins/pluginsadministration/webpack.common.js +1 −4 Go to diff View file
M plugins/pullrequest/webpack.common.js +0 −2 Go to diff View file
M plugins/statistics/webpack.common.js +0 −1 Go to diff View file
M plugins/svn/webpack.common.js +0 −4 Go to diff View file
M plugins/testmanagement/webpack.common.js +0 −2 Go to diff View file
M plugins/timetracking/webpack.common.js +0 −1 Go to diff View file
M plugins/tracker/webpack.common.js +2 −8 Go to diff View file
M plugins/tuleap_synchro/webpack.common.js +1 −4 Go to diff View file
M plugins/velocity/webpack.common.js +1 −5 Go to diff View file
M src/common/layout/Layout.class.php +2 −2 Go to diff View file
M src/webpack.common.js +21 −25 Go to diff View file
M tools/utils/scripts/browserslist_config.d.ts +1 −0 Go to diff View file
M tools/utils/scripts/browserslist_config.js +5 −0 Go to diff View file
M tools/utils/scripts/vite-configurator.ts +4 −6 Go to diff View file
M tools/utils/scripts/webpack-configurator.js +12 −29 Go to diff View file
M tools/utils/scripts/webpack-rule-configs.js +4 −41 Go to diff View file