Skip to content

Commit

Permalink
fix: demo site
Browse files Browse the repository at this point in the history
  • Loading branch information
EastSun5566 committed May 6, 2022
1 parent b6585c9 commit f91ce4d
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 465 deletions.
9 changes: 6 additions & 3 deletions demo/config/webpackDevServer.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable strict */

'use strict';

const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
const evalSourceMapMiddleware = require('react-dev-utils/evalSourceMapMiddleware');
const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
const ignoredFiles = require('react-dev-utils/ignoredFiles');
const paths = require('./paths');
const fs = require('fs');
const paths = require('./paths');

const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';
const host = process.env.HOST || '0.0.0.0';

module.exports = function(proxy, allowedHost) {
module.exports = function (proxy, allowedHost) {
return {
// WebpackDevServer 2.4.3 introduced a security fix that prevents remote
// websites from potentially accessing local content through DNS rebinding:
Expand Down Expand Up @@ -104,7 +107,7 @@ module.exports = function(proxy, allowedHost) {
// We do this in development to avoid hitting the production cache if
// it used the same host and port.
// https://github.com/facebook/create-react-app/issues/2272#issuecomment-302832432
app.use(noopServiceWorkerMiddleware());
app.use(noopServiceWorkerMiddleware(''));
},
};
};
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"jest-resolve": "26.1.0",
"jest-watch-typeahead": "0.6.0",
"mini-css-extract-plugin": "0.9.0",
"node-sass": "^7.0.0",
"optimize-css-assets-webpack-plugin": "5.0.3",
"pnp-webpack-plugin": "1.6.4",
"postcss-flexbugs-fixes": "4.2.1",
Expand Down Expand Up @@ -152,6 +151,7 @@
"eslint-plugin-react": "^7.17.0",
"eslint-plugin-react-hooks": "^4.0.8",
"gh-pages": "^3.1.0",
"sass": "^1.51.0",
"source-map-explorer": "^2.4.2"
}
}
Loading

0 comments on commit f91ce4d

Please sign in to comment.