123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- 'use strict';
-
- const errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');
- const noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');
- const ignoredFiles = require('react-dev-utils/ignoredFiles');
- const config = require('./webpack.config.dev');
- 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) {
- return {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disableHostCheck:
- !proxy || process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true',
-
- compress: true,
-
-
- clientLogLevel: 'none',
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- contentBase: paths.appPublic,
-
- watchContentBase: true,
-
-
-
-
-
- hot: true,
-
-
- publicPath: config.output.publicPath,
-
-
- quiet: true,
-
-
-
-
- watchOptions: {
- ignored: ignoredFiles(paths.appSrc),
- },
-
- https: protocol === 'https',
- host: host,
- overlay: false,
- historyApiFallback: {
-
-
- disableDotRule: true,
- },
- public: allowedHost,
- proxy,
- before(app) {
-
- app.use(errorOverlayMiddleware());
-
-
-
-
-
- app.use(noopServiceWorkerMiddleware());
- },
- };
- };
|