File tree Expand file tree Collapse file tree 3 files changed +3089
-5191
lines changed
Expand file tree Collapse file tree 3 files changed +3089
-5191
lines changed Original file line number Diff line number Diff line change 1+ // ... so the webpack5 config used by react-scripts 5.0.0
2+ // doesn't like .mjs files, so we use react-scripts-rewire
3+ // to add support for this (the aws appsync modules, for
4+ // example, need this)
5+ // See: https://github.com/graphql/graphql-js/issues/2721
6+
7+ module . exports = function override ( config ) {
8+ config . module . rules . push ( {
9+ test : / \. m ? j s / ,
10+ resolve : {
11+ fullySpecified : false ,
12+ fallback : {
13+ crypto : false
14+ }
15+ }
16+ } ) ;
17+
18+ config . ignoreWarnings = [ / F a i l e d t o p a r s e s o u r c e m a p / ] ;
19+ return config ;
20+ }
21+
Original file line number Diff line number Diff line change 2727 "react" : " ^16.13.1" ,
2828 "react-dom" : " ^16.13.1" ,
2929 "react-router-dom" : " ^5.2.0" ,
30- "react-scripts" : " ^4 .0.3 " ,
30+ "react-scripts" : " ^5 .0.0 " ,
3131 "styled-components" : " ^5.3.0" ,
3232 "styled-system" : " ^5.1.5" ,
3333 "typescript" : " 3.9.7"
3434 },
3535 "devDependencies" : {
3636 "@types/node" : " ^12.20.15" ,
37- "browserslist" : " ^4.16.6"
37+ "browserslist" : " ^4.16.6" ,
38+ "react-app-rewired" : " ^2.1.11"
3839 },
3940 "resolutions" : {
4041 "axios" : " ^0.21.2" ,
4344 "nth-check" : " ^2.0.1" ,
4445 "glob-parent" : " ^5.1.2" ,
4546 "browserslist" : " ^4.16.5" ,
47+ "postcss" : " ^8.2.1" ,
4648 "immer" : " ^9.0.6"
4749 },
4850 "scripts" : {
49- "start" : " react-scripts start" ,
50- "build" : " react-scripts build" ,
51- "eject" : " react-scripts eject"
51+ "start" : " react-app-rewired start" ,
52+ "build" : " react-app-rewired build" ,
53+ "eject" : " react-app-rewired eject"
5254 },
5355 "eslintConfig" : {
5456 "extends" : [
You can’t perform that action at this time.
0 commit comments