Skip to content

Commit 271b506

Browse files
committed
build: replace rewire with craco for one example
1 parent c9a6d38 commit 271b506

File tree

4 files changed

+149
-21
lines changed

4 files changed

+149
-21
lines changed

example/above/config-overrides.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

example/above/craco.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* eslint-disable */
2+
const { CracoAliasPlugin, configPaths } = require('react-app-alias-ex');
3+
const aliasPaths = configPaths('./tsconfig.paths.json')
4+
5+
module.exports = {
6+
plugins: [
7+
{
8+
plugin: CracoAliasPlugin,
9+
options: {
10+
alias: aliasPaths,
11+
},
12+
},
13+
],
14+
};

example/above/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6+
"@craco/craco": "^6.4.3",
67
"@testing-library/jest-dom": "^5.15.0",
78
"@testing-library/react": "^12.1.0",
89
"@testing-library/user-event": "^13.5.0",
@@ -12,16 +13,15 @@
1213
"@types/react-dom": "^17.0.11",
1314
"react": "^17.0.2",
1415
"react-app-alias-ex": "^0.0.0",
15-
"react-app-rewired": "^2.1.6",
1616
"react-dom": "^17.0.2",
1717
"react-scripts": "4.0.3",
1818
"typescript": "4.4.4",
1919
"web-vitals": "^2.1.0"
2020
},
2121
"scripts": {
22-
"start": "react-app-rewired start",
23-
"build": "react-app-rewired build",
24-
"test": "react-app-rewired test"
22+
"start": "craco start",
23+
"build": "craco build",
24+
"test": "craco test"
2525
},
2626
"eslintConfig": {
2727
"extends": [

example/above/yarn.lock

Lines changed: 131 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,30 @@
12171217
exec-sh "^0.3.2"
12181218
minimist "^1.2.0"
12191219

1220+
"@craco/craco@^6.4.3":
1221+
version "6.4.3"
1222+
resolved "https://registry.yarnpkg.com/@craco/craco/-/craco-6.4.3.tgz#784395b6ebab764056550a2860494d24c3abd44e"
1223+
integrity sha512-RzkXYmNzRCGUyG7mM+IUMM+nvrpSfA34352sPSGQN76UivAmCAht3sI4v5JKgzO05oUK9Zwi6abCKD7iKXI8hQ==
1224+
dependencies:
1225+
cosmiconfig "^7.0.1"
1226+
cosmiconfig-typescript-loader "^1.0.0"
1227+
cross-spawn "^7.0.0"
1228+
lodash "^4.17.15"
1229+
semver "^7.3.2"
1230+
webpack-merge "^4.2.2"
1231+
1232+
"@cspotcode/[email protected]":
1233+
version "0.8.0"
1234+
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b"
1235+
integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==
1236+
1237+
"@cspotcode/[email protected]":
1238+
version "0.7.0"
1239+
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz#4789840aa859e46d2f3173727ab707c66bf344f5"
1240+
integrity sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==
1241+
dependencies:
1242+
"@cspotcode/source-map-consumer" "0.8.0"
1243+
12201244
"@csstools/convert-colors@^1.4.0":
12211245
version "1.4.0"
12221246
resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7"
@@ -1742,6 +1766,26 @@
17421766
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
17431767
integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==
17441768

1769+
"@tsconfig/node10@^1.0.7":
1770+
version "1.0.8"
1771+
resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9"
1772+
integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==
1773+
1774+
"@tsconfig/node12@^1.0.7":
1775+
version "1.0.9"
1776+
resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.9.tgz#62c1f6dee2ebd9aead80dc3afa56810e58e1a04c"
1777+
integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==
1778+
1779+
"@tsconfig/node14@^1.0.0":
1780+
version "1.0.1"
1781+
resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2"
1782+
integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==
1783+
1784+
"@tsconfig/node16@^1.0.2":
1785+
version "1.0.2"
1786+
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e"
1787+
integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==
1788+
17451789
"@types/aria-query@^4.2.0":
17461790
version "4.2.2"
17471791
resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-4.2.2.tgz#ed4e0ad92306a704f9fb132a0cfcf77486dbe2bc"
@@ -2280,6 +2324,11 @@ acorn-walk@^7.1.1:
22802324
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc"
22812325
integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==
22822326

2327+
acorn-walk@^8.1.1:
2328+
version "8.2.0"
2329+
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1"
2330+
integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==
2331+
22832332
acorn@^6.4.1:
22842333
version "6.4.2"
22852334
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6"
@@ -2295,6 +2344,11 @@ acorn@^8.2.4:
22952344
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2"
22962345
integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==
22972346

2347+
acorn@^8.4.1:
2348+
version "8.7.0"
2349+
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf"
2350+
integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==
2351+
22982352
[email protected], address@^1.0.1:
22992353
version "1.1.2"
23002354
resolved "https://registry.yarnpkg.com/address/-/address-1.1.2.tgz#bf1116c9c758c51b7a933d296b72c221ed9428b6"
@@ -2435,6 +2489,11 @@ aproba@^1.1.1:
24352489
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
24362490
integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==
24372491

2492+
arg@^4.1.0:
2493+
version "4.1.3"
2494+
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
2495+
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
2496+
24382497
argparse@^1.0.7:
24392498
version "1.0.10"
24402499
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
@@ -3630,6 +3689,14 @@ core-util-is@~1.0.0:
36303689
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85"
36313690
integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==
36323691

3692+
cosmiconfig-typescript-loader@^1.0.0:
3693+
version "1.0.5"
3694+
resolved "https://registry.yarnpkg.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-1.0.5.tgz#22373003194a1887bbccbdfd05a13501397109a8"
3695+
integrity sha512-FL/YR1nb8hyN0bAcP3MBaIoZravfZtVsN/RuPnoo6UVjqIrDxSNIpXHCGgJe0ZWy5yImpyD6jq5wCJ5f1nUv8g==
3696+
dependencies:
3697+
cosmiconfig "^7"
3698+
ts-node "^10.5.0"
3699+
36333700
cosmiconfig@^5.0.0:
36343701
version "5.2.1"
36353702
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a"
@@ -3651,7 +3718,7 @@ cosmiconfig@^6.0.0:
36513718
path-type "^4.0.0"
36523719
yaml "^1.7.2"
36533720

3654-
cosmiconfig@^7.0.0:
3721+
cosmiconfig@^7, cosmiconfig@^7.0.0, cosmiconfig@^7.0.1:
36553722
version "7.0.1"
36563723
resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d"
36573724
integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==
@@ -3693,6 +3760,11 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7:
36933760
safe-buffer "^5.0.1"
36943761
sha.js "^2.4.8"
36953762

3763+
create-require@^1.1.0:
3764+
version "1.1.1"
3765+
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
3766+
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
3767+
36963768
[email protected], cross-spawn@^7.0.0, cross-spawn@^7.0.2:
36973769
version "7.0.3"
36983770
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
@@ -4167,6 +4239,11 @@ diff-sequences@^27.0.6:
41674239
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.6.tgz#3305cb2e55a033924054695cc66019fd7f8e5723"
41684240
integrity sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ==
41694241

4242+
diff@^4.0.1:
4243+
version "4.0.2"
4244+
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
4245+
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
4246+
41704247
diffie-hellman@^5.0.0:
41714248
version "5.0.3"
41724249
resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875"
@@ -7154,6 +7231,11 @@ make-dir@^3.0.0, make-dir@^3.0.2:
71547231
dependencies:
71557232
semver "^6.0.0"
71567233

7234+
make-error@^1.1.1:
7235+
version "1.3.6"
7236+
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
7237+
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
7238+
71577239
71587240
version "1.0.12"
71597241
resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a"
@@ -9099,6 +9181,18 @@ [email protected]:
90999181
iconv-lite "0.4.24"
91009182
unpipe "1.0.0"
91019183

9184+
react-app-alias-ex@^0.0.0:
9185+
version "1.0.0"
9186+
resolved "https://registry.yarnpkg.com/react-app-alias-ex/-/react-app-alias-ex-1.0.0.tgz#d41a7c16be47915f6955fde2feeb1caeb3c55372"
9187+
integrity sha512-PIf7d+tZhJiwsBIzvBDYtWBuO/xhlRW2Jaxny4MfqnkSHPocAhD97a051Q7QMtiBEDt2WmFrBfVZ5Zx3IhjgPw==
9188+
dependencies:
9189+
react-app-alias "^0.0.0"
9190+
9191+
react-app-alias@^0.0.0:
9192+
version "1.0.0"
9193+
resolved "https://registry.yarnpkg.com/react-app-alias/-/react-app-alias-1.0.0.tgz#8c644e0f537e802e0a7de7d0cba327d1caee45ca"
9194+
integrity sha512-rOA8TKlN932zFCjnZjWzvTk9GLs7b6dgj2BDpJ3Pvi5oxpVvaGHroAL//YxEXxJiLE3lFLchTfAD9FbN7/SChQ==
9195+
91029196
react-app-polyfill@^2.0.0:
91039197
version "2.0.0"
91049198
resolved "https://registry.yarnpkg.com/react-app-polyfill/-/react-app-polyfill-2.0.0.tgz#a0bea50f078b8a082970a9d853dc34b6dcc6a3cf"
@@ -9111,16 +9205,6 @@ react-app-polyfill@^2.0.0:
91119205
regenerator-runtime "^0.13.7"
91129206
whatwg-fetch "^3.4.1"
91139207

9114-
"react-app-rewire-alias@file:../..":
9115-
version "1.1.5"
9116-
9117-
react-app-rewired@^2.1.6:
9118-
version "2.1.8"
9119-
resolved "https://registry.yarnpkg.com/react-app-rewired/-/react-app-rewired-2.1.8.tgz#e192f93b98daf96889418d33d3e86cf863812b56"
9120-
integrity sha512-wjXPdKPLscA7mn0I1de1NHrbfWdXz4S1ladaGgHVKdn1hTgKK5N6EdGIJM0KrS6bKnJBj7WuqJroDTsPKKr66Q==
9121-
dependencies:
9122-
semver "^5.6.0"
9123-
91249208
react-dev-utils@^11.0.3:
91259209
version "11.0.4"
91269210
resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-11.0.4.tgz#a7ccb60257a1ca2e0efe7a83e38e6700d17aa37a"
@@ -10655,6 +10739,25 @@ tryer@^1.0.1:
1065510739
resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8"
1065610740
integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==
1065710741

10742+
ts-node@^10.5.0:
10743+
version "10.5.0"
10744+
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.5.0.tgz#618bef5854c1fbbedf5e31465cbb224a1d524ef9"
10745+
integrity sha512-6kEJKwVxAJ35W4akuiysfKwKmjkbYxwQMTBaAxo9KKAx/Yd26mPUyhGz3ji+EsJoAgrLqVsYHNuuYwQe22lbtw==
10746+
dependencies:
10747+
"@cspotcode/source-map-support" "0.7.0"
10748+
"@tsconfig/node10" "^1.0.7"
10749+
"@tsconfig/node12" "^1.0.7"
10750+
"@tsconfig/node14" "^1.0.0"
10751+
"@tsconfig/node16" "^1.0.2"
10752+
acorn "^8.4.1"
10753+
acorn-walk "^8.1.1"
10754+
arg "^4.1.0"
10755+
create-require "^1.1.0"
10756+
diff "^4.0.1"
10757+
make-error "^1.1.1"
10758+
v8-compile-cache-lib "^3.0.0"
10759+
yn "3.1.1"
10760+
1065810761
[email protected], ts-pnp@^1.1.6:
1065910762
version "1.2.0"
1066010763
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92"
@@ -10977,6 +11080,11 @@ uuid@^8.3.0:
1097711080
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
1097811081
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
1097911082

11083+
v8-compile-cache-lib@^3.0.0:
11084+
version "3.0.0"
11085+
resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz#0582bcb1c74f3a2ee46487ceecf372e46bce53e8"
11086+
integrity sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==
11087+
1098011088
v8-compile-cache@^2.0.3:
1098111089
version "2.3.0"
1098211090
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
@@ -11143,6 +11251,13 @@ [email protected]:
1114311251
object.entries "^1.1.0"
1114411252
tapable "^1.0.0"
1114511253

11254+
webpack-merge@^4.2.2:
11255+
version "4.2.2"
11256+
resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d"
11257+
integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==
11258+
dependencies:
11259+
lodash "^4.17.15"
11260+
1114611261
webpack-sources@^1.1.0, webpack-sources@^1.3.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3:
1114711262
version "1.4.3"
1114811263
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933"
@@ -11551,6 +11666,11 @@ yargs@^15.4.1:
1155111666
y18n "^4.0.0"
1155211667
yargs-parser "^18.1.2"
1155311668

11669+
11670+
version "3.1.1"
11671+
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
11672+
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
11673+
1155411674
yocto-queue@^0.1.0:
1155511675
version "0.1.0"
1155611676
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"

0 commit comments

Comments
 (0)