stable

Clone or download

Read-only

Have a common component to DRY webpack configs

Part of request #11334 Reduce copy of webpack configurations and modules Introduces a "webpack-configurator" file. This helps DRY frequent definitions in webpack files such as Babel config, Plugins, Rules, etc. All babel modules are now installed at tuleap root. This helps reuse them and helps keep consistent versions for babel-core, babel-polyfill, etc. Commonly used webpack plugins are now installed at tuleap root (and reused through the configurator). Migrates label webpack config as a proof of concept, other plugins will follow. Production optimizations (such as ModuleConcatenationPlugin) are not worth moving to the configurator because the next webpack version (v4) will run them by default. When we upgrade, we can simply remove them. Change-Id: I47addfbeedf7337a7394a4a90a1f5e9f44fe8c29

Modified Files

Name
M package-lock.json +6552 −917 Go to diff View file
M package.json +18 −5 Go to diff View file
M plugins/label/www/scripts/package-lock.json +5 −1399 Go to diff View file
M plugins/label/www/scripts/package.json +1 −13 Go to diff View file
M plugins/label/www/scripts/project-labeled-items/src/gettext-provider.js +2 −2 Go to diff View file
M plugins/label/www/scripts/webpack.config.js +10 −98 Go to diff View file
M src/www/scripts/package-lock.json +2 −1536 Go to diff View file
M src/www/scripts/package.json +1 −13 Go to diff View file
M src/www/scripts/webpack.config.js +32 −122 Go to diff View file
M src/www/themes/common/tlp/package-lock.json +0 −1141 Go to diff View file
M src/www/themes/common/tlp/package.json +1 −7 Go to diff View file
M src/www/themes/common/tlp/webpack.config.js +12 −38 Go to diff View file
R tools/utils/ie11-polyfill-names.js Go to diff View file
A tools/utils/scripts/webpack-configurator.js +59 −0 Go to diff View file
A tools/utils/scripts/webpack-rule-configs.js +117 −0 Go to diff View file