the browser-facing portion of osu!

Skip dev only webpack plugins on production

nanaya 6cc0b655 bf17bae7

+1 -1
package.json
··· 36 36 "blueimp-file-upload": "^9.11.2", 37 37 "bootstrap": "^3.3.6", 38 38 "chokidar": "^3.5.2", 39 - "clean-webpack-plugin": "^3.0.0", 40 39 "clipboard-polyfill": "^2.3.0", 41 40 "coffee-loader": "^0.9.0", 42 41 "coffeescript": "^1.12.6", ··· 104 103 "devDependencies": { 105 104 "@typescript-eslint/eslint-plugin": "^6.6.0", 106 105 "@typescript-eslint/parser": "^6.6.0", 106 + "clean-webpack-plugin": "^4.0.0", 107 107 "eslint": "^7.15.0", 108 108 "eslint-plugin-import": "^2.22.1", 109 109 "eslint-plugin-jsdoc": "^30.7.8",
+6 -6
webpack.config.js
··· 9 9 const path = require('path'); 10 10 11 11 const Autoprefixer = require('autoprefixer'); 12 - const { CleanWebpackPlugin } = require('clean-webpack-plugin'); 13 12 const CopyPlugin = require('copy-webpack-plugin'); 14 13 const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); 15 14 const dotenv = require('dotenv'); ··· 130 129 131 130 // TODO: should have a different flag for this 132 131 if (!inProduction) { 132 + const { CleanWebpackPlugin } = require('clean-webpack-plugin'); 133 133 plugins.push(new CleanWebpackPlugin()); 134 - } 135 134 136 - const notifierConfigPath = resolvePath('.webpack-build-notifier-config.js'); 137 - if (fs.existsSync(notifierConfigPath)) { 138 - const WebpackBuildNotifierPlugin = require('webpack-build-notifier'); 139 - plugins.push(new WebpackBuildNotifierPlugin(require(notifierConfigPath))); 135 + const notifierConfigPath = resolvePath('.webpack-build-notifier-config.js'); 136 + if (fs.existsSync(notifierConfigPath)) { 137 + const WebpackBuildNotifierPlugin = require('webpack-build-notifier'); 138 + plugins.push(new WebpackBuildNotifierPlugin(require(notifierConfigPath))); 139 + } 140 140 } 141 141 142 142 // #endregion
+15 -59
yarn.lock
··· 389 389 resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" 390 390 integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== 391 391 392 - "@types/anymatch@*": 393 - version "1.3.1" 394 - resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a" 395 - integrity sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA== 396 - 397 392 "@types/autosize@^4.0.1": 398 393 version "4.0.1" 399 394 resolved "https://registry.yarnpkg.com/@types/autosize/-/autosize-4.0.1.tgz#999a7c305b96766248044ebaac1a0299961f3b61" ··· 649 644 integrity sha512-wE2v81i4C4Ol09RtsWFAqg3BUitWbHSpSlIo+bNdsCJijO9sjme+zm+73ZMCa/qMC8UEERxzGbvmr1cffo2SiQ== 650 645 651 646 "@types/glob@^7.1.1": 652 - version "7.1.3" 653 - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" 654 - integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== 647 + version "7.2.0" 648 + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" 649 + integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== 655 650 dependencies: 656 651 "@types/minimatch" "*" 657 652 "@types/node" "*" ··· 748 743 "@types/unist" "*" 749 744 750 745 "@types/minimatch@*": 751 - version "3.0.3" 752 - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" 753 - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== 746 + version "5.1.2" 747 + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" 748 + integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== 754 749 755 750 "@types/ms@*": 756 751 version "0.7.31" ··· 810 805 resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.2.tgz#a811b8c18e2babab7d542b3365887ae2e4d9de47" 811 806 integrity sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg== 812 807 813 - "@types/source-list-map@*": 814 - version "0.1.2" 815 - resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9" 816 - integrity sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA== 817 - 818 - "@types/tapable@*": 819 - version "1.0.6" 820 - resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.6.tgz#a9ca4b70a18b270ccb2bc0aaafefd1d486b7ea74" 821 - integrity sha512-W+bw9ds02rAQaMvaLYxAbJ6cvguW/iJXNT6lTssS1ps6QdrMKttqEAMEG/b5CR8TZl3/L7/lH0ZV5nNR1LXikA== 822 - 823 808 "@types/timeago@^1.6.0": 824 809 version "1.6.0" 825 810 resolved "https://registry.yarnpkg.com/@types/timeago/-/timeago-1.6.0.tgz#67c9c5db18e49cc6e47bbaa096dbc4721b79f295" ··· 827 812 dependencies: 828 813 "@types/jquery" "*" 829 814 830 - "@types/uglify-js@*": 831 - version "3.9.3" 832 - resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.9.3.tgz#d94ed608e295bc5424c9600e6b8565407b6b4b6b" 833 - integrity sha512-KswB5C7Kwduwjj04Ykz+AjvPcfgv/37Za24O2EDzYNbwyzOo8+ydtvzUfZ5UMguiVu29Gx44l1A6VsPPcmYu9w== 834 - dependencies: 835 - source-map "^0.6.1" 836 - 837 815 "@types/unist@*", "@types/unist@^2.0.0", "@types/unist@^2.0.6": 838 816 version "2.0.6" 839 817 resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" 840 818 integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== 841 819 842 - "@types/webpack-sources@*": 843 - version "1.4.2" 844 - resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-1.4.2.tgz#5d3d4dea04008a779a90135ff96fb5c0c9e6292c" 845 - integrity sha512-77T++JyKow4BQB/m9O96n9d/UUHWLQHlcqXb9Vsf4F1+wKNrrlWNFPDLKNT92RJnCSL6CieTc+NDXtCVZswdTw== 846 - dependencies: 847 - "@types/node" "*" 848 - "@types/source-list-map" "*" 849 - source-map "^0.7.3" 850 - 851 - "@types/webpack@^4.4.31": 852 - version "4.41.22" 853 - resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.41.22.tgz#ff9758a17c6bd499e459b91e78539848c32d0731" 854 - integrity sha512-JQDJK6pj8OMV9gWOnN1dcLCyU9Hzs6lux0wBO4lr1+gyEhIBR9U3FMrz12t2GPkg110XAxEAw2WHF6g7nZIbRQ== 855 - dependencies: 856 - "@types/anymatch" "*" 857 - "@types/node" "*" 858 - "@types/tapable" "*" 859 - "@types/uglify-js" "*" 860 - "@types/webpack-sources" "*" 861 - source-map "^0.6.0" 862 - 863 820 "@types/yargs-parser@*": 864 821 version "21.0.0" 865 822 resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" ··· 1827 1784 isobject "^3.0.0" 1828 1785 static-extend "^0.1.1" 1829 1786 1830 - clean-webpack-plugin@^3.0.0: 1831 - version "3.0.0" 1832 - resolved "https://registry.yarnpkg.com/clean-webpack-plugin/-/clean-webpack-plugin-3.0.0.tgz#a99d8ec34c1c628a4541567aa7b457446460c62b" 1833 - integrity sha512-MciirUH5r+cYLGCOL5JX/ZLzOZbVr1ot3Fw+KcvbhUb6PM+yycqd9ZhIlcigQ5gl+XhppNmw3bEFuaaMNyLj3A== 1787 + clean-webpack-plugin@^4.0.0: 1788 + version "4.0.0" 1789 + resolved "https://registry.yarnpkg.com/clean-webpack-plugin/-/clean-webpack-plugin-4.0.0.tgz#72947d4403d452f38ed61a9ff0ada8122aacd729" 1790 + integrity sha512-WuWE1nyTNAyW5T7oNyys2EN0cfP2fdRxhxnIQWiAp0bMabPdHhoGxM8A6YL2GhqwgrPnnaemVE7nv5XJ2Fhh2w== 1834 1791 dependencies: 1835 - "@types/webpack" "^4.4.31" 1836 1792 del "^4.1.1" 1837 1793 1838 1794 clipboard-polyfill@^2.3.0: ··· 3630 3586 globby@^6.1.0: 3631 3587 version "6.1.0" 3632 3588 resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" 3633 - integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw= 3589 + integrity sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw== 3634 3590 dependencies: 3635 3591 array-union "^1.0.1" 3636 3592 glob "^7.0.3" ··· 5834 5790 path-is-inside@^1.0.2: 5835 5791 version "1.0.2" 5836 5792 resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 5837 - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= 5793 + integrity sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w== 5838 5794 5839 5795 path-key@^2.0.0, path-key@^2.0.1: 5840 5796 version "2.0.1" ··· 5900 5856 pify@^2.0.0: 5901 5857 version "2.3.0" 5902 5858 resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 5903 - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= 5859 + integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== 5904 5860 5905 5861 pify@^3.0.0: 5906 5862 version "3.0.0" ··· 5915 5871 pinkie-promise@^2.0.0: 5916 5872 version "2.0.1" 5917 5873 resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 5918 - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= 5874 + integrity sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw== 5919 5875 dependencies: 5920 5876 pinkie "^2.0.0" 5921 5877 5922 5878 pinkie@^2.0.0: 5923 5879 version "2.0.4" 5924 5880 resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 5925 - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= 5881 + integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== 5926 5882 5927 5883 pkg-dir@^2.0.0: 5928 5884 version "2.0.0"