Skip to content

Commit

Permalink
adding patch workaround as per suggestion webpack/webpack-dev-server#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gregkowalski committed Nov 16, 2018
1 parent e539028 commit 8609f1c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions patches/react-scripts+2.1.1.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,30 @@ patch-package
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
entry: [

--- a/node_modules/react-scripts/config/webpackDevServer.config.js
+++ b/node_modules/react-scripts/config/webpackDevServer.config.js
@@ -18,6 +18,14 @@

const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
const host = process.env.HOST || '0.0.0.0';
+let httpsOptions = undefined;
+if (protocol === 'https') {
+ httpsOptions = {
+ spdy: {
+ protocols: ['http/1.1']
+ }
+ }
+}

module.exports = function(proxy, allowedHost) {
return {
@@ -81,7 +89,7 @@
ignored: ignoredFiles(paths.appSrc),
},
// Enable HTTPS if the HTTPS environment variable is set to 'true'
- https: protocol === 'https',
+ https: httpsOptions,
host,
overlay: false,
historyApiFallback: {

0 comments on commit 8609f1c

Please sign in to comment.