I am new to React apps so please excuse me if my question has an easy answer. I have spent the last few days with Google and have not found a solution for my question.
At my new position, I have been asked to modify a current React app. The short of it is that this app was built before my time and is old. The app does not permit for a dev build. And since it does not allow for a dev build our development team can not see the component layout, props, or state along with any other goodies provided by the React Dev Tools.
My question is how do I make my app work properly with the React Dev Tools?
Other details that may help:
Files are located in ABC/app/src/common
Normally here at my employer, this would translate into a URL of:
www.ABC.com/app/
. Yet for some reason, this is not how things are set up.
Instead the app is served from a URL subdomain:
app.XYZ.com
Also, note that the URL www.XYZ.com
is not a React app - (not sure this is relevant)
Basically the build scripts create the bundle and the .min files are moved from the ABC/app/src/common
folder to app.XYZ/
.
package.JSON:
"name": "ABC-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.0-14",
"@fortawesome/free-solid-svg-icons": "^5.1.0-11",
"@fortawesome/react-fontawesome": "0.1.0-11",
"ajv": "^6.0.0",
"alertifyjs": "^1.11.2",
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",
"connected-react-router": "^4.4.1",
"dateformat": "^3.0.3",
"deep-freeze": "0.0.1",
"fast-deep-equal": "^2.0.1",
"fuse.js": "^3.4.6",
"history": "^4.7.2",
"i": "^0.3.6",
"moment": "^2.22.2",
"node-sass-chokidar": "^1.3.3",
"npm": "^6.2.0",
"prop-types": "^15.6.2",
"react": "^16.5.0",
"react-collapse": "^4.0.3",
"react-dom": "^16.4.1",
"react-html-parser": "^2.0.2",
"react-loading": "^2.0.3",
"react-motion": "^0.5.2",
"react-redux": "^5.0.7",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-router-redux": "^4.0.8",
"react-scripts": "^1.1.4",
"react-select": "^2.0.0",
"react-table-container": "^2.0.1",
"react-topbar-progress-indicator": "^2.0.0",
"react-transition-group": "^2.4.0",
"react-virtualized": "^9.20.1",
"redux": "^3.7.2",
"redux-thunk": "^2.3.0"
},
"scripts": {
"build-css": "node-sass-chokidar src/ -o src/",
"watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive",
"start": "yarn run build-css && react-scripts build && yarn run move-js && yarn run move-css",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"commit": "react-scripts build && yarn run move-js && yarn run move-css",
"move-js": "cp ./build/static/js/main.*.js ../../app.XYZ.com/assets/js/main.js",
"move-css": "cp ./build/static/css/main.*.css ../../app.XYZ.com/assets/css/main.css"
},
"proxy": "http://dev-app.XYZ.com/",
"devDependencies": {
"eslint": "^5.7.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.11.1",
"redux-devtools": "^3.4.1",
"redux-logger": "^3.0.6",
"why-did-you-update": "^0.1.1"
},
"browserslist": {
"development": [
"last 2 chrome versions",
"last 2 firefox versions",
"last 2 edge versions"
],
"production": [
">0.25%",
"not op_mini all",
"ie 11"
]
}
}