Skip to content

Commit 1979318

Browse files
committed
Migrated to react-app-rewired 5 so we can use postcss ^8.21.1
- to deal with security warnings for older postcss
1 parent 442bc72 commit 1979318

File tree

3 files changed

+3089
-5191
lines changed

3 files changed

+3089
-5191
lines changed

Website/config-overrides.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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?js/,
10+
resolve: {
11+
fullySpecified: false,
12+
fallback: {
13+
crypto: false
14+
}
15+
}
16+
});
17+
18+
config.ignoreWarnings = [/Failed to parse source map/];
19+
return config;
20+
}
21+

Website/package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@
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",
@@ -43,12 +44,13 @@
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": [

0 commit comments

Comments
 (0)