Skip to content

Commit 5d79d61

Browse files
fixed build with craco
1 parent 1564bd3 commit 5d79d61

File tree

6 files changed

+1523
-1271
lines changed

6 files changed

+1523
-1271
lines changed

app/backend/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var fs = require('fs');
88
const port = process.env.PORT;
99
const appHost = process.env.APP_HOST;
1010
const appPort = process.env.APP_PORT;
11-
//const origin = `http://${appHost}:${appPort}`
11+
//const origin = `${appHost}:${appPort}`
1212
const origin = "*"
1313

1414
const server = http.createServer(function (req, res) {

app/frontend/.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
HOST=0.0.0.0
21
REACT_APP_MapboxAccessToken=token
32
REACT_APP_DTServer=http://localhost:8081

app/frontend/craco.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
babel: {
3+
loaderOptions: {
4+
ignore: ['./node_modules/mapbox-gl/dist/mapbox-gl.js']
5+
}
6+
}
7+
};

app/frontend/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"main": "index.js",
55
"license": "MIT",
66
"dependencies": {
7+
"@craco/craco": "^6.3.0",
78
"@emotion/react": "^11.4.0",
89
"@emotion/styled": "^11.3.0",
910
"@material-ui/core": "^4.12.1",
@@ -36,9 +37,9 @@
3637
"yarn": "^1.22.10"
3738
},
3839
"scripts": {
39-
"start": "PORT=8080 react-scripts start",
40-
"build": "react-scripts build",
41-
"test": "react-scripts test",
40+
"start": "PORT=8080 craco start",
41+
"build": "craco build",
42+
"test": "craco test",
4243
"eject": "react-scripts eject"
4344
},
4445
"eslintConfig": {
@@ -51,6 +52,9 @@
5152
"production": [
5253
">0.2%",
5354
"not dead",
55+
"not ie 11",
56+
"not chrome < 51",
57+
"not safari < 10",
5458
"not op_mini all"
5559
],
5660
"development": [

app/frontend/src/store/actions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ export function getLocationDT(location) {
302302
let region = "akl";
303303
let url = DT_SERVER+`/transit?region=${region}&location=${location}&direction=inbound`;
304304

305+
console.log(url);
305306
// console.log('getting data for destination:', location);
306307

307308
const inbound = fetch(url)

0 commit comments

Comments
 (0)