Skip to content

Commit 6a4ffad

Browse files
committed
Remove copy-webpack-plugin
I'm having trouble with this plugin with Webpack v5 in watch mode. It's currently only used to copy 3 files to the build dir: * root/favicon.ico * root/robots.txt.production * root/robots.txt.staging So it can be replaced with a single cp in compile_resources.sh. The only "regression" here would be that the files are not re-copied *in watch mode when they change*, but (1) watch mode is for development, where robots.txt serves no purpose, and (2) the favicon is one of the least-likely resources to change.
1 parent 8f503d3 commit 6a4ffad

File tree

4 files changed

+5
-137
lines changed

4 files changed

+5
-137
lines changed

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"balanced-match": "0.2.0",
3030
"canonical-json": "0.0.4",
3131
"cookie": "0.4.0",
32-
"copy-webpack-plugin": "6.4.0",
3332
"core-js": "3.6.5",
3433
"detect-node": "2.0.3",
3534
"file-loader": "6.2.0",

script/compile_resources.sh

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ ln -sf ../../../../node_modules/leaflet/dist/images/*.png .
2020
find . -type l ! -exec test -e '{}' \; -exec rm '{}' \;
2121
popd > /dev/null
2222

23+
cp -a root/favicon.ico root/robots.txt.* "$BUILD_DIR"
24+
2325
if [ -z "$GIT_BRANCH" ]; then
2426
export GIT_BRANCH=$(./script/git_info branch)
2527
fi

webpack.client.config.js

-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
const canonicalJson = require('canonical-json');
10-
const CopyWebpackPlugin = require('copy-webpack-plugin');
1110
const fs = require('fs');
1211
const ManifestPlugin = require('webpack-manifest-plugin');
1312
const path = require('path');
@@ -220,13 +219,6 @@ if (PRODUCTION_MODE) {
220219
}
221220

222221
plugins.push.apply(plugins, [
223-
new CopyWebpackPlugin({
224-
patterns: [
225-
{context: './root/', from: 'favicon.ico', to: '.'},
226-
{context: './root/', from: 'robots.txt.*', to: '.'},
227-
],
228-
}),
229-
230222
new ManifestPlugin({
231223
fileName: 'rev-manifest.json',
232224
}),

yarn.lock

+3-128
Original file line numberDiff line numberDiff line change
@@ -1302,27 +1302,6 @@
13021302
readdirp "^2.2.1"
13031303
upath "^1.1.1"
13041304

1305-
"@nodelib/[email protected]":
1306-
version "2.1.5"
1307-
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
1308-
integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==
1309-
dependencies:
1310-
"@nodelib/fs.stat" "2.0.5"
1311-
run-parallel "^1.1.9"
1312-
1313-
"@nodelib/[email protected]", "@nodelib/fs.stat@^2.0.2":
1314-
version "2.0.5"
1315-
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b"
1316-
integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==
1317-
1318-
"@nodelib/fs.walk@^1.2.3":
1319-
version "1.2.8"
1320-
resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a"
1321-
integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==
1322-
dependencies:
1323-
"@nodelib/fs.scandir" "2.1.5"
1324-
fastq "^1.6.0"
1325-
13261305
"@npmcli/move-file@^1.0.1":
13271306
version "1.1.2"
13281307
resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674"
@@ -1822,11 +1801,6 @@ array-includes@^3.1.1:
18221801
es-abstract "^1.17.0"
18231802
is-string "^1.0.5"
18241803

1825-
array-union@^2.1.0:
1826-
version "2.1.0"
1827-
resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
1828-
integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
1829-
18301804
array-unique@^0.3.2:
18311805
version "0.3.2"
18321806
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
@@ -2066,7 +2040,7 @@ braces@^2.3.1, braces@^2.3.2:
20662040
split-string "^3.0.2"
20672041
to-regex "^3.0.1"
20682042

2069-
braces@^3.0.1, braces@~3.0.2:
2043+
braces@~3.0.2:
20702044
version "3.0.2"
20712045
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
20722046
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
@@ -2632,23 +2606,6 @@ copy-descriptor@^0.1.0:
26322606
resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
26332607
integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=
26342608

2635-
2636-
version "6.4.0"
2637-
resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-6.4.0.tgz#7fd397af78e0d310dbf6575d1a0f2fe10efd4d59"
2638-
integrity sha512-p4eIA0ZWk4UI+xewyxOBTDCSDfjK6nCkr3zhDenoi7SFd+NgDNH/D14IZeFaCEFcK/psNDcAUMOB+sAxZ3SsAA==
2639-
dependencies:
2640-
cacache "^15.0.5"
2641-
fast-glob "^3.2.4"
2642-
find-cache-dir "^3.3.1"
2643-
glob-parent "^5.1.1"
2644-
globby "^11.0.1"
2645-
loader-utils "^2.0.0"
2646-
normalize-path "^3.0.0"
2647-
p-limit "^3.0.2"
2648-
schema-utils "^3.0.0"
2649-
serialize-javascript "^5.0.1"
2650-
webpack-sources "^1.4.3"
2651-
26522609
core-js-compat@^3.14.0, core-js-compat@^3.16.0:
26532610
version "3.16.1"
26542611
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.16.1.tgz#c44b7caa2dcb94b673a98f27eee1c8312f55bc2d"
@@ -2929,13 +2886,6 @@ difflet@^0.2.6:
29292886
deep-is "0.1.x"
29302887
traverse "0.6.x"
29312888

2932-
dir-glob@^3.0.1:
2933-
version "3.0.1"
2934-
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
2935-
integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==
2936-
dependencies:
2937-
path-type "^4.0.0"
2938-
29392889
docopt@^0.6.2:
29402890
version "0.6.2"
29412891
resolved "https://registry.yarnpkg.com/docopt/-/docopt-0.6.2.tgz#b28e9e2220da5ec49f7ea5bb24a47787405eeb11"
@@ -3451,17 +3401,6 @@ fast-deep-equal@^3.1.1:
34513401
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4"
34523402
integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==
34533403

3454-
fast-glob@^3.1.1, fast-glob@^3.2.4:
3455-
version "3.2.7"
3456-
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1"
3457-
integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==
3458-
dependencies:
3459-
"@nodelib/fs.stat" "^2.0.2"
3460-
"@nodelib/fs.walk" "^1.2.3"
3461-
glob-parent "^5.1.2"
3462-
merge2 "^1.3.0"
3463-
micromatch "^4.0.4"
3464-
34653404
fast-json-stable-stringify@^2.0.0:
34663405
version "2.1.0"
34673406
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
@@ -3472,13 +3411,6 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6:
34723411
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
34733412
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
34743413

3475-
fastq@^1.6.0:
3476-
version "1.11.1"
3477-
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.1.tgz#5d8175aae17db61947f8b162cfc7f63264d22807"
3478-
integrity sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==
3479-
dependencies:
3480-
reusify "^1.0.4"
3481-
34823414
figgy-pudding@^3.5.1:
34833415
version "3.5.2"
34843416
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e"
@@ -3796,7 +3728,7 @@ glob-parent@^5.0.0:
37963728
dependencies:
37973729
is-glob "^4.0.1"
37983730

3799-
glob-parent@^5.1.1, glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2:
3731+
glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2:
38003732
version "5.1.2"
38013733
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
38023734
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
@@ -3863,18 +3795,6 @@ globals@^12.1.0:
38633795
dependencies:
38643796
type-fest "^0.8.1"
38653797

3866-
globby@^11.0.1:
3867-
version "11.0.4"
3868-
resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5"
3869-
integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==
3870-
dependencies:
3871-
array-union "^2.1.0"
3872-
dir-glob "^3.0.1"
3873-
fast-glob "^3.1.1"
3874-
ignore "^5.1.4"
3875-
merge2 "^1.3.0"
3876-
slash "^3.0.0"
3877-
38783798
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
38793799
version "4.2.4"
38803800
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
@@ -4076,11 +3996,6 @@ ignore@^4.0.6:
40763996
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
40773997
integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
40783998

4079-
ignore@^5.1.4:
4080-
version "5.1.8"
4081-
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
4082-
integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==
4083-
40843999
image-size@~0.5.0:
40854000
version "0.5.5"
40864001
resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
@@ -4975,11 +4890,6 @@ merge-stream@^2.0.0:
49754890
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
49764891
integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
49774892

4978-
merge2@^1.3.0:
4979-
version "1.4.1"
4980-
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
4981-
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
4982-
49834893
micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4:
49844894
version "3.1.10"
49854895
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
@@ -4999,14 +4909,6 @@ micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4:
49994909
snapdragon "^0.8.1"
50004910
to-regex "^3.0.2"
50014911

5002-
micromatch@^4.0.4:
5003-
version "4.0.4"
5004-
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9"
5005-
integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==
5006-
dependencies:
5007-
braces "^3.0.1"
5008-
picomatch "^2.2.3"
5009-
50104912
miller-rabin@^4.0.0:
50114913
version "4.0.1"
50124914
resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d"
@@ -5686,11 +5588,6 @@ path-type@^3.0.0:
56865588
dependencies:
56875589
pify "^3.0.0"
56885590

5689-
path-type@^4.0.0:
5690-
version "4.0.0"
5691-
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
5692-
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
5693-
56945591
pbkdf2@^3.0.3:
56955592
version "3.0.17"
56965593
resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6"
@@ -5764,7 +5661,7 @@ [email protected]:
57645661
dependencies:
57655662
split "^1.0.0"
57665663

5767-
picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3:
5664+
picomatch@^2.0.4, picomatch@^2.2.1:
57685665
version "2.3.0"
57695666
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
57705667
integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
@@ -6011,11 +5908,6 @@ [email protected]:
60115908
resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
60125909
integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=
60135910

6014-
queue-microtask@^1.2.2:
6015-
version "1.2.3"
6016-
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
6017-
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
6018-
60195911
randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0:
60205912
version "2.1.0"
60215913
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
@@ -6449,11 +6341,6 @@ ret@~0.1.10:
64496341
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
64506342
integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==
64516343

6452-
reusify@^1.0.4:
6453-
version "1.0.4"
6454-
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
6455-
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
6456-
64576344
right-align@^0.1.1:
64586345
version "0.1.3"
64596346
resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
@@ -6490,13 +6377,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
64906377
hash-base "^3.0.0"
64916378
inherits "^2.0.1"
64926379

6493-
run-parallel@^1.1.9:
6494-
version "1.2.0"
6495-
resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
6496-
integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==
6497-
dependencies:
6498-
queue-microtask "^1.2.2"
6499-
65006380
run-queue@^1.0.0, run-queue@^1.0.3:
65016381
version "1.0.3"
65026382
resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47"
@@ -6718,11 +6598,6 @@ slash@^2.0.0:
67186598
resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44"
67196599
integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==
67206600

6721-
slash@^3.0.0:
6722-
version "3.0.0"
6723-
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
6724-
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
6725-
67266601
slice-ansi@^2.1.0:
67276602
version "2.1.0"
67286603
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636"

0 commit comments

Comments
 (0)