Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Fix: Display QR Codes in "Patientendatenerfassung" (#335)
Browse files Browse the repository at this point in the history
* add webpack plugin process+buffer

* add config-overrides to docker
  • Loading branch information
ggrund-tsi authored Feb 20, 2023
1 parent bf7b2d0 commit b0966e5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /

COPY public ./public
COPY src ./src
COPY package.json tsconfig.json yarn.lock* ./
COPY package.json tsconfig.json yarn.lock* config-overrides.js ./

RUN yarn && yarn build

Expand Down
11 changes: 11 additions & 0 deletions config-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const webpack = require('webpack');

module.exports = function override(config) {
config.plugins = (config.plugins || []).concat([
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
}),
]);
return config;
};
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@testing-library/user-event": "^14.4.3",
"axios": "^1.3.3",
"bootstrap": "^4.6.0",
"buffer": "^6.0.3",
"crypto-js": "^4.0.0",
"file-saver": "^2.0.5",
"generate-license-file": "^2.0.0",
Expand All @@ -19,14 +20,16 @@
"i18next-browser-languagedetector": "^7.0.1",
"i18next-http-backend": "^2.0.1",
"icao-transliteration": "https://github.com/corona-warn-app/cwa-icao-transliteration.git",
"lint-staged": "^13.1.2",
"keycloak-js": "^20.0.1",
"lint-staged": "^13.1.2",
"moment": "^2.29.1",
"popper.js": "1.16.1",
"prettier": "^2.2.1",
"process": "^0.11.10",
"prop-types": "15.8.1",
"qrcode.react": "^3.1.0",
"react": "^18.2.0",
"react-app-rewired": "^2.2.1",
"react-bootstrap": "^1.5.2",
"react-datepicker": "^4.6.0",
"react-dom": "^18.2.0",
Expand All @@ -48,10 +51,10 @@
},
"proxy": "https://6155b8d7d3c6.schnelltestportal.de",
"scripts": {
"start": "react-scripts --openssl-legacy-provider start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"start": "react-app-rewired --openssl-legacy-provider start",
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-app-rewired eject",
"license": "generate-license-file --input package.json --output THIRD-PARTY-NOTICES"
},
"eslintConfig": {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"]
"include": ["src", "config-overrides.js"]
}

0 comments on commit b0966e5

Please sign in to comment.