Fix upstream issue in Create-React-App (#514)

* Fix upstream issue in Create-React-App

Signed-off-by: Xavier Geerinck <xavier.geerinck@gmail.com>

* Add distributed calculator fix for upstream plugin

Signed-off-by: Xavier Geerinck <xavier.geerinck@gmail.com>

* Editing wrong file

Signed-off-by: Xavier Geerinck <xavier.geerinck@gmail.com>

* Undo edits

Signed-off-by: Xavier Geerinck <xavier.geerinck@gmail.com>

* Make the build process a bit more clear

Signed-off-by: Xavier Geerinck <xavier.geerinck@gmail.com>
This commit is contained in:
Xavier Geerinck 2022-01-18 18:21:36 +01:00 committed by GitHub
parent 54c775f22b
commit 26ae0d06cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 58 additions and 50 deletions

View File

@ -2,7 +2,11 @@ FROM node:17-alpine
WORKDIR /usr/src/app
COPY . .
RUN npm install
RUN npm run buildclient
# Build the client
RUN cd client; npm i
EXPOSE 8080
EXPOSE 3000
CMD [ "npm", "run", "start" ]

View File

@ -1,32 +1,36 @@
{
"name": "client",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-scripts": "^5.0.0"
},
"proxy": "http://localhost:8080/",
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
"name": "client",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:8080/",
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"dependencies": {
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-scripts": "^5.0.0",
"mini-css-extract-plugin": "2.4.5"
},
"resolutions": {
"mini-css-extract-plugin": "2.4.5"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

View File

@ -1,19 +1,19 @@
{
"name": "react-docker-app",
"version": "1.0.0",
"scripts": {
"client": "cd client && yarn start",
"server": "nodemon server.js",
"dev": "concurrently --kill-others-on-fail \"yarn server\" \"yarn client\"",
"start": "node server.js",
"buildclient": "cd client && npm install && npm install --only=dev --no-shrinkwrap && npm run build"
},
"dependencies": {
"body-parser": "^1.18.3",
"express": "^4.16.4",
"request": "^2.88.0"
},
"devDependencies": {
"concurrently": "^4.0.1"
}
}
"name": "react-docker-app",
"version": "1.0.0",
"scripts": {
"client": "cd client && yarn start",
"server": "nodemon server.js",
"dev": "concurrently --kill-others-on-fail \"yarn server\" \"yarn client\"",
"start": "node server.js",
"buildclient": "cd client && npm install && npm install --only=dev --no-shrinkwrap && npm run build"
},
"dependencies": {
"body-parser": "^1.18.3",
"express": "^4.16.4",
"request": "^2.88.0"
},
"devDependencies": {
"concurrently": "^4.0.1"
}
}